Try This: How to Create Masks With the Custom Depth Buffer | Tips & Tricks | Unreal Engine - YouTube
Material nodes:
Added the multiply node for the emissive intensity. You won’t get any type of lighting from it, not even SSGI. the fog will not be affected either.
Result:
Also works great when behind objects:
If performance is not your concern and want light to affect the immediate area, add a light in front of every window.
Hope it helps.



