-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Fix issue in shadow to opacity #91096
Fix issue in shadow to opacity #91096
Conversation
One sec, there is more to this, there is a mismatch on the ifdefs, it shouldn't do anything with alpha during depth pass if |
e37cdda
to
97cd1a9
Compare
Ok, fixed it and tested it in passthrough in XR. |
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.
Thanks so much! This works great in my testing with the Compatibility renderer :-)
The only suggestion I'd make is changing the PR title and commit message, because this fixes the Forward+ renderer as well, not just GLES3.
I think this same code is in the mobile renderer too. It might need to be fixed as well |
97cd1a9
to
a8468ca
Compare
oops! fixed! :) |
a8468ca
to
d2d2274
Compare
Thanks! |
This fixes this bug in the GLES3 implementation of shadow to opacity:
You can test this with this shader:
Shadow to opacity is used in AR applications to render transparent geometry where there is geometry in real life. Think of a table or wall or anything like that. We render this geometry in the Opaque pass but with transparency based on how much in shadow we are.
We don't have access to
ambient_light
during depth passes or shadow passes hence the error. The fix now excludes our lighting check and alpha scissor check during depth/shadow pass which is correct behaviour. This allows for real live geometry to be visible through passthrough, accurately occlude other virtual geometry and casing shadows on virtual geometry.