-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
WebGLRenderer: Optimize number of light shadow uniforms. #18627
Conversation
Point light shadow uniforms are now in a separate struct so they don't need to be included in case shadows are not enabled. This makes it possible to use more shadowless lights on platforms that have low limits for uniform count. It was experimentally verified that this change makes a difference on 7th gen iPad with iPadOS 13.3.1.
The shaders only contain code for active shadows, so they don't need a separate flag to determine whether the shadow is enabled.
In terms of overall performance or being able to make the scene more complex? |
I was able to significantly increase the number of shadowless point lights in the scene on iPad after this change without running into shader compilation issues. |
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.
I've locally tested the PR today. Examples work as expected and the code changes look good, too.
Lets merge this in r115. I guess this will break |
Well, I've tested all node examples and they work fine^^. @sunag Could this change still affect |
@Mugen87 No problem for me. |
Lets merge it now then! YOLO 😁 |
Thanks! |
Thanks for merging this! |
Light shadow uniforms are now in a separate struct so they don't need to be included in case shadows are not enabled.
This makes it possible to use more shadowless lights on platforms that have low limits for uniform count.
It was experimentally verified that this change makes a difference on 7th gen iPad with iPadOS 13.3.1.