# Dynamic light caching and dynamic buffer

**URL:** <https://forums.unrealengine.com/t/dynamic-light-caching-and-dynamic-buffer/428048>\
**Category:** Rendering\
**Tags:** buffer, light, unreal-engine, Rendering, question\
**Created:** [June 25, 2018, 1:16pm UTC](https://forums.unrealengine.com/t/dynamic-light-caching-and-dynamic-buffer/428048 "2018-06-25T13:16:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phoboz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@phoboz](https://forums.unrealengine.com/u/phoboz)\
**Post date:** [June 25, 2018, 1:16pm UTC](https://forums.unrealengine.com/t/dynamic-light-caching-and-dynamic-buffer/428048/1 "2018-06-25T13:16:08Z")

</div>

Does setting the buffer usage flag to **BUF\_Dynamic** automatically affects the dynamic light caching for this mesh?  
For my test mesh, it seems that just by changing this flag, the **ShadowDepths** statistic goes from ~12.52ms to ~21.03ms.

On the other hand, setting the proxy’s **bGoodCandidateForCachedShadowmap** to _false_ or the **Mobility** to _Movable_ (as per **IsMeshShapeOftenMoving()**) doesn’t seem to raise the same statistic (it does degrade the overall performance a little tho).

 ![248611-bufdyn.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/e/9/3e9639cca47d7a19a68a22cc6741123d3411641f.jpeg)

---

<div class="post-metadata">

**Author:** ![Waurelius](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/waurelius/32/924263_2.png) [@Waurelius](https://forums.unrealengine.com/u/Waurelius)\
**Post date:** [July 28, 2018, 1:39am UTC](https://forums.unrealengine.com/t/dynamic-light-caching-and-dynamic-buffer/428048/2 "2018-07-28T01:39:07Z")

</div>

Exactly which buffer are you changing in the engine? BUF\_STATIC vs BUF\_DYNAMIC is going to move you from D3D11\_USAGE\_DEFAULT to D3D11\_USAGE\_DYNAMIC which could have various effects depending on the driver and HW.

---

<div class="post-metadata">

**Author:** ![phoboz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@phoboz](https://forums.unrealengine.com/u/phoboz)\
**Post date:** [July 28, 2018, 5:27am UTC](https://forums.unrealengine.com/t/dynamic-light-caching-and-dynamic-buffer/428048/3 "2018-07-28T05:27:55Z")

</div>

At the moment I have a static vertex buffer with dynamically constructed index buffer - essentially a dynamically built LOD
