# Why do I need to click 'render as main texture' for the material to take effect?

**URL:** <https://forum.babylonjs.com/t/why-do-i-need-to-click-render-as-main-texture-for-the-material-to-take-effect/52394>\
**Category:** Questions\
**Created:** [July 29, 2024, 7:36am UTC](https://forum.babylonjs.com/t/why-do-i-need-to-click-render-as-main-texture-for-the-material-to-take-effect/52394 "2024-07-29T07:36:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhang](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@zhang](https://forum.babylonjs.com/u/zhang)\
**Post date:** [July 29, 2024, 7:36am UTC](https://forum.babylonjs.com/t/why-do-i-need-to-click-render-as-main-texture-for-the-material-to-take-effect/52394/1 "2024-07-29T07:36:56Z")

</div>

It seems to be related to freezeActiveMeshes, but some materials do not have this issue.

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [July 29, 2024, 8:08am UTC](https://forum.babylonjs.com/t/why-do-i-need-to-click-render-as-main-texture-for-the-material-to-take-effect/52394/2 "2024-07-29T08:08:34Z")

</div>

PG please.

OR:

> [@Render as main texture with code](https://forum.babylonjs.com/t/render-as-main-texture-with-code/14235):
>
> Hi My mesh is not ideal. But I do not need any smoothness on it or effects. But it renders with black artifacts. It goes away when I toggle in inspector Material \> Textures \> Albedo wrench icon “Render as main texture”, And I like that. How can I apply this on mesh load to my material??

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 29, 2024, 4:00pm UTC](https://forum.babylonjs.com/t/why-do-i-need-to-click-render-as-main-texture-for-the-material-to-take-effect/52394/3 "2024-07-29T16:00:51Z")

</div>

@zhang, can you provide a repro ???

---

<div class="post-metadata">

**Author:** ![zhang](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@zhang](https://forum.babylonjs.com/u/zhang)\
**Post date:** [July 31, 2024, 1:28am UTC](https://forum.babylonjs.com/t/why-do-i-need-to-click-render-as-main-texture-for-the-material-to-take-effect/52394/4 "2024-07-31T01:28:48Z")

</div>

It shouldn’t work, this problem requires using freezeActiveMeshes in a large number of gltf instances to occur, and I find it difficult to create such an environment in the playground. However, I have now cancelled the use of freezeActiveMeshes. I suspect it may be a problem with the execution order of some code.
