# Problems : having a spotlight-shone area have a certain stencil value, with a g-buffer. 

**URL:** <https://forums.unrealengine.com/t/problems-having-a-spotlight-shone-area-have-a-certain-stencil-value-with-a-g-buffer/2463079>\
**Category:** Rendering\
**Tags:** Render-Pipeline, unreal-engine, runtime, Lighting, Rendering, question, Blueprint, CPP\
**Created:** [April 18, 2025, 1:30pm UTC](https://forums.unrealengine.com/t/problems-having-a-spotlight-shone-area-have-a-certain-stencil-value-with-a-g-buffer/2463079 "2025-04-18T13:30:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wookable2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wookable2/32/1048421_2.png) [@wookable2](https://forums.unrealengine.com/u/wookable2)\
**Post date:** [April 18, 2025, 1:30pm UTC](https://forums.unrealengine.com/t/problems-having-a-spotlight-shone-area-have-a-certain-stencil-value-with-a-g-buffer/2463079/1 "2025-04-18T13:30:16Z")

</div>

I want to implement a feature where there is a stencil value change in the area to which a spot light is shone. I’ve heard of Shadow Pass Switches, but it did not quite fit the direction I was going for. Essentially, I want a shadow catcher / shadow pass, but with dynamic spot lights.  
Can anybody help me in guiding me to it?  
Below are some images for reference!

 ![ref`1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/0/a/20a30daa3b55ed027c3a3640dcdd9449d3fbcad8.png)  
which will render the stencils to  
 ![Ref](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/6/9/b697c649f92a65d0d9f5c6963f89238bfc2b8b08.png)
