Skip to content
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

Setting Scene#skyBoxRotation invalidates all shader variants #5458

Closed
willeastcott opened this issue Jul 4, 2023 · 1 comment · Fixed by #5467
Closed

Setting Scene#skyBoxRotation invalidates all shader variants #5458

willeastcott opened this issue Jul 4, 2023 · 1 comment · Fixed by #5467
Assignees
Labels
area: graphics Graphics related issue performance Relating to load times or frame rate

Comments

@willeastcott
Copy link
Contributor

For the 3D Tiles project, this causes about 80% of a frame to be spent on regenerating shaders:

image

I can work around this by now calling Scene#skyBoxRotation every frame, but this engine behavior is currently way to aggressive.

@willeastcott willeastcott added performance Relating to load times or frame rate area: graphics Graphics related issue labels Jul 4, 2023
@willeastcott willeastcott changed the title Setting Scene#skyBoxRotation invalidate all shader variants Setting Scene#skyBoxRotation invalidates all shader variants Jul 4, 2023
@mvaligursky
Copy link
Contributor

mvaligursky commented Jul 4, 2023

Note to myself (or whoever will fix this): set skyboxRotation function calls _resetSky which sets updateShaders = true;. This is used to regenerate shaders that depend on skybox rotation. I think if the matrix is identity, the shader chunk is skipped. This should be matched here and resetSky should perhaps be only called when the matrix switches between identity and non-identity.

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 a pull request may close this issue.

2 participants