-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make FOG_ENABLED a shader_def instead of material flag #13783
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, fog tends to be all or nothing so this is unlikely to make more shader variants in any real world scenarios, and saves some registers when not used.
i think keeping the other flags unchanged and commenting the old fog flag as unused is the right call as well.
# Objective - If the fog is disabled it still generates a useless branch which can hurt performance ## Solution - Make the flag a shader_def instead ## Testing - I tested enabling/disabling fog works as expected per-material in the fog example - I also tested that scenes that don't add the FogSettings resource still work correctly ## Review notes I'm not sure how to handle the removed material flag. Right now I just commented it out and added a not to reuse it instead of creating a new one.
This wasn't done the right way, I don't think. What I suggested was to make the |
…ngine#13783)" This reverts commit 3ced49f.
Objective
Solution
Testing
Review notes
I'm not sure how to handle the removed material flag. Right now I just commented it out and added a not to reuse it instead of creating a new one.