Unity Directional Light Bleeding Trhough Wall
In some situations normal bias can cause an unwanted effect called light bleeding where light bleeds through from nearby geometry into areas that should be shadowed.
Unity directional light bleeding trhough wall. I was wondering how i could go about culling the lights so they no longer shine through walls. Any help is greatly appreciated. You can simulate this in shaders or use raycasts to see if the light is behind a wall. If you are a moderator see our moderator guidelines page.
In that case you ll need to be a bit more clever. Create a unity primitive cube plane etc sized similarly to your wall remove its collider and in the mesh renderer properties set it to shadows only. If a light is next to a wall on one side you can see it on the floor on the other side. This is caused because the use inverse squared falloff is set to on by default forcing you to have to use way more lights than whats needed or to set it s value far outs side acceptable values.
I believe this has something to do with culling masks or light culling. Place it just behind your wall so that it blocks the light from leaking out. That s why shadows exist. The best place to ask and answer questions about development with unity.
These options have obvious edge cases that can t be easily resolved. If you are a new user to unity answers check out our faq for more information. To help users navigate the site we have posted a site navigation guide. Shadows are the obvious answer however i assume you are using lite and that s not an option.
As an off the wall guess though it looks like your trying to force beta your lighting values far beyond their limitations that is causing the lighting solution to bleed.