# Shadows rendering only once inquiry

**URL:** <https://forum.babylonjs.com/t/shadows-rendering-only-once-inquiry/27263>\
**Category:** Questions\
**Created:** [January 31, 2022, 9:10pm UTC](https://forum.babylonjs.com/t/shadows-rendering-only-once-inquiry/27263 "2022-01-31T21:10:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesgjwu](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@jamesgjwu](https://forum.babylonjs.com/u/jamesgjwu)\
**Post date:** [January 31, 2022, 9:10pm UTC](https://forum.babylonjs.com/t/shadows-rendering-only-once-inquiry/27263/1 "2022-01-31T21:10:29Z")

</div>

Good Day, Babylon Community,

I have a question about the shadows of my asset.  
I am implementing the following code into my project:

shadowGenerator.getShadowMap().refreshRate = BABYLON.RenderTargetTexture.REFRESHRATE\_RENDER\_ONCE;

I anticipate adding this bit of code will make my scene more efficient. I created shadows for my scene, I checked the refreshRate of my asset. I was getting a value of one, after my scene is fully load, I changed the refreshRate to a value of zero. I observe that the refresh rate has indeed changed to zero for my asset shadows.  
My expectation is if shadows are refreshing only once, changing the position of my asset in my scene should not update the shadows associated with the asset because my scene is NOT updating shadows every frame. However, when I use the inspector to move my asset from one position to another, the shadows associated with my asset updates with its position. Is my expectation of the asset shadow staying place incorrect? Or is it something else?

Warm Regards,

James Wu

---

<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:** [January 31, 2022, 10:36pm UTC](https://forum.babylonjs.com/t/shadows-rendering-only-once-inquiry/27263/2 "2022-01-31T22:36:46Z")

</div>

This is pretty weird indeed REFRESHRATE\_RENDER\_ONCE would force the rendering of the shadow map to happen only once.

Could you share a repro in the playground ?

---

<div class="post-metadata">

**Author:** ![jamesgjwu](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@jamesgjwu](https://forum.babylonjs.com/u/jamesgjwu)\
**Post date:** [January 31, 2022, 10:40pm UTC](https://forum.babylonjs.com/t/shadows-rendering-only-once-inquiry/27263/3 "2022-01-31T22:40:44Z")

</div>

I was only able to observe the behavior in my current branch. I am going to see if I can recreate a playground where this is occurring.

---

<div class="post-metadata">

**Author:** ![jamesgjwu](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@jamesgjwu](https://forum.babylonjs.com/u/jamesgjwu)\
**Post date:** [February 1, 2022, 12:04am UTC](https://forum.babylonjs.com/t/shadows-rendering-only-once-inquiry/27263/4 "2022-02-01T00:04:47Z")

</div>

Thank you for getting back to me. I missed the “light.autoUpdateExtends = false” block. My apologies for the confusion.
