-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fix shader compilation fail when using visibility range #21879
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
base: main
Are you sure you want to change the base?
Conversation
NicoZweifel
left a comment
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 was able to reproduce the issue in both examples and the PR fixes both examples.
One import at the top instead of in both blocks (#ifdef and #else) would be nice though.
NicoZweifel
left a comment
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 accidentally left some empty lines in the suggestions but looks good to go to me, thanks!
Co-authored-by: Nico Zweifel <[email protected]>
Objective
When using both deferred rendering and visibility range, shader
pbr.wgslcan't be compiled becausepbr_functionsis not imported.The issue can be reproduced by using
DefaultOpaqueRendererMethod::deferred()and addingDeferredPrepassto camera at the visibility_range example.Solution
Import
pbr_functionswhen usingPREPASS_PIPELINE.Testing
I tested on visibility_range and deferred_rendering example. However, importing something usually doesn't break anything.