-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Add spatial light shader built in for light_specular
property
#75055
Conversation
I don't think it's ideal to have both LIGHT_SPECULAR (this) and SPECULAR_LIGHT (output from light shader), but there are some arguments for it IMO:
I did not try to change the gles3 renderer because I couldn't get omni or spot lights working in a custom light shader there, they did not appear to contribute any light at all. |
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.
This seems very helpful!
2 things:
- Changes should be made for the OpenGL renderer as well
- While I agree with you that
LIGHT_SPECULAR
would be the ideal name, the similarity toSPECULAR_LIGHT
is just too close to be ignored. Unfortunately, I think thatSPECULAR_AMOUNT
would be a better name.
Light3D has a light_specular property which is used to set the intensity of specular contributed by this light source, but it was previously only used by the default material light shader, and not possible to use in a custom light() shader.
Thanks for the review. Updated according to suggestions. Now I got omni lights working in the gles3 renderer without issues, dunno why it didn't last time. |
Docs update godotengine/godot-docs#7277 |
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 good!
Note to whoever merges this, the Docs PR can be merged right after. godotengine/godot-docs#7277 |
Merged, merged the docs PR as well - thanks for contributing! |
light_specular
property
Light3D has a light_specular property which is used to set the intensity of specular contributed by this light source, but it was previously only used by the default material light shader, and not possible to use in a custom light() shader.