-
-
Notifications
You must be signed in to change notification settings - Fork 21.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
glTF2 use alpha, alpha to coverage and depth prepass #52407
Conversation
c9abc49
to
4b5e8be
Compare
609e126
to
f22af86
Compare
material->set_transparency(BaseMaterial3D::TRANSPARENCY_ALPHA_SCISSOR); | ||
material->set_alpha_antialiasing(BaseMaterial3D::ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE_AND_TO_ONE); |
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'm not sure if this is the best approach. Won't this only work when MSAA is enabled? E.g. when alpha to coverage is available?
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.
According to the originator, it works when msaa is off.
https://bgolus.medium.com/anti-aliased-alpha-test-the-esoteric-alpha-to-coverage-8b177335ae4f
<Ben Golus> In fact if MSAA is disabled Alpha to Coverage falls back to alpha test. This means it isn’t only useful for VR or other games where you’re guaranteed to have MSAA enabled. Basically there’s rarely a reason to use straight alpha testing ever!
Closing for now due to need to reevaluate. |
0bdbce6
For https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/AlphaBlendModeTest cases.
Fixes the second case of blending from gltf2 test case.
Fixes hair for the the blend case.
Not fixed in the PR: Alpha being order independent transparency.