Skip to content

Optimize shader generation with many clustered lights #7735

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

Merged
merged 1 commit into from
Jun 3, 2025

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Jun 3, 2025

For each light that the shader needs, we include light declaration / implementation chunks.
In clustered case, we only need to do this for directional lights, and so exclude other lights from options.
If those are included, the shader needs to include all those chunks for each light, taking long time to preprocess the shader
Including 100 lights adds about 100ms of processing for no reason at all.

@mvaligursky mvaligursky self-assigned this Jun 3, 2025
@mvaligursky mvaligursky added performance Relating to load times or frame rate area: graphics Graphics related issue labels Jun 3, 2025
@mvaligursky mvaligursky requested a review from a team June 3, 2025 14:23
@mvaligursky mvaligursky merged commit 264312d into main Jun 3, 2025
7 checks passed
@mvaligursky mvaligursky deleted the mv-lights-preprocessing-optim branch June 3, 2025 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue performance Relating to load times or frame rate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants