-
-
Notifications
You must be signed in to change notification settings - Fork 22.8k
Always send lights to sky shader if using sun scatter #107928
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
Conversation
Do you know why this isn't needed with the compatibility renderer? the code appears to be the same |
6905990
to
51dd182
Compare
@clayjohn I actually went back and tested again and you're right to question why this doesn't happen in Compatibility because it does have a similar problem which I've now fixed. godot/drivers/gles3/rasterizer_scene_gles3.cpp Lines 687 to 688 in 987832b
In the Compatibility renderer the light count only gets set to 0 in the sky if the shader uses any of the LIGHTX_* built-ins, so if you add a light while you have a sky which uses them and then remove all of the built-ins the sun scatter stays but does not update if you modify the lights.
|
51dd182
to
a14cc76
Compare
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.
Looks great!
a14cc76
to
e659daf
Compare
@clayjohn I made a minor change: updating the lights solely for sun scatter should probably also check if fog is enabled. I'm not sure if you need to approve this again or how that side of things works. |
Thanks for letting me know. I usually approve again in these situations. |
Thanks! |
Currently sun scatter isn't applied to the sky properly if the sky shader doesn't contain any
LIGHTX_*
built-ins.Fixes #107924.