unity-game-enginerenderingfoglight

Need Forward rendering for fog, but Deferred rendering to keep out light


So I've hit a bit of an oddball in my project. I'm creating a horror scene. To support the atmosphere I've used Unity's lighting component fog. For my camera to see this fog, I need it to be on Forward rendering. However, I'm creating a hallway with different rooms and lights, and these lights seem to shine through my wall objects when forward rendering is off. Something I can fix by using deferred rendering instead (But then there's no fog).

It feels weird I'm in a position where I have to choose between the two and can't have it both ways. I tried messing around with some of the Legacy rendering, but no dice. All lights have a shadow strength of 1, and walls even have additional "Shadows only" walls, just to be sure nothing gets through.

It should be mentioned that I'm using one plane for all rooms (Not prefabs, one BIG object) if that has any impact at all.

Anyone experienced similar issues who has any workarounds?


Solution

  • If anyone runs into a similar issue, it's important to have different planes for different rooms. I was using 1 plane for the whole level, which caused this lighting bug to occur.