# Render CustomProceduralTexture when uniform changes

**URL:** <https://forum.babylonjs.com/t/render-customproceduraltexture-when-uniform-changes/13746>\
**Category:** Questions\
**Created:** [August 28, 2020, 3:17pm UTC](https://forum.babylonjs.com/t/render-customproceduraltexture-when-uniform-changes/13746 "2020-08-28T15:17:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@adam](https://forum.babylonjs.com/u/adam)\
**Post date:** [August 28, 2020, 3:17pm UTC](https://forum.babylonjs.com/t/render-customproceduraltexture-when-uniform-changes/13746/1 "2020-08-28T15:17:03Z")

</div>

Is there a way to only render a custom procedural texture when a uniform changes?

I’m looking at ProceduralTexture.shouldRender function and it appears that you need to give the texture a refresh rate or set it to animate for it to render.

> <https://github.com/BabylonJS/Babylon.js/blob/master/src/Materials/Textures/Procedurals/proceduralTexture.ts#L298>

---

<div class="post-metadata">

**Author:** ![adam](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@adam](https://forum.babylonjs.com/u/adam)\
**Post date:** [August 28, 2020, 3:57pm UTC](https://forum.babylonjs.com/t/render-customproceduraltexture-when-uniform-changes/13746/2 "2020-08-28T15:57:12Z")

</div>

I just found ProceduralTexture.resetRefreshCounter:

> <https://github.com/BabylonJS/Babylon.js/blob/master/src/Materials/Textures/Procedurals/proceduralTexture.ts#L271>

I’ll call that whenever I change a uniform.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [August 28, 2020, 5:44pm UTC](https://forum.babylonjs.com/t/render-customproceduraltexture-when-uniform-changes/13746/3 "2020-08-28T17:44:43Z")

</div>

good job 😃
