bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
34.33k stars 3.35k forks source link

Fog toggling shader flag is suboptimal #13802

Open alice-i-cecile opened 1 month ago

alice-i-cecile commented 1 month ago

This wasn't done the right way, I don't think. What I suggested was to make the FOG_ENABLED shader def contingent on whether the view has fog, not whether the material had a flag that disables it.

Originally posted by @pcwalton in https://github.com/bevyengine/bevy/issues/13783#issuecomment-2159306477

pcwalton commented 1 month ago

It does work correctly, so it's not technically a bug, it's just not designed optimally I don't think.

alice-i-cecile commented 1 month ago

This PR also caused a regression with fog in general, so for now we should just revert it.