OndrejNepozitek / Edgar-Unity

Unity Procedural Level Generator
https://ondrejnepozitek.github.io/Edgar-Unity/docs/introduction
MIT License
817 stars 70 forks source link

Fog Of War - Not affected by global lighting #127

Open lrojas94 opened 7 months ago

lrojas94 commented 7 months ago

Pretty much as the title describes here, it looks to me as if the Fog of War is not affected whatsoever by lighting. I tried taking a peek at the code/shader, but don't know nearly enough to get to a fix there.

image

As seen in the image (With a super exagerated example) - the fog is stuck to the initial camera color and does not react to the global lighting. I'd love to know if this is supported/planned to be supported or simply not possible for performance reasons 🤷. Would be a nice to have, but not a hill I'll die on.

OndrejNepozitek commented 7 months ago

Hey, you're correct that the Fog of War does not react with lighning in any way. But did you know that you can manually change the color of the fog? You can set the "Color mode" to "Custom color" (on the Fog of War component) and pick any color you want.

Would that fix your problem?

lrojas94 commented 7 months ago

Not really no :/. I wanted to add ambience light and whatnot. Guess I'll have to do without one of the 2 👍

OndrejNepozitek commented 7 months ago

Could you please describe how exactly would you like the Fog to behave?

lrojas94 commented 7 months ago

Basically, I want to apply custom post-processing lighting / effects. Meaning, I'd want Fog of War to take on the "colors" in whatever lighting I add (As seen in the pic above). The idea in the picture is I have a green-hue-light covering the screen, which because Fog of War ignores the light, looks awful, but would look ok otherwise (as it does with default camera).