-
-
Notifications
You must be signed in to change notification settings - Fork 35.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
WebGLShadowMap: Add support for rendering shadows with alpha maps and alpha test. #22410
Conversation
if ( ( _renderer.localClippingEnabled && material.clipShadows === true && material.clippingPlanes.length !== 0 ) || | ||
( material.displacementMap && material.displacementScale !== 0 ) || material.alphaMap ) { |
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.
Not a bit fan of this code. But, to be honest, I've not tried to understand it...
After this PR, this code shouldn't be needed. Can anyone think of use cases for |
Actually, seems like They are only referenced in WebGLShadowMap even if they are documented. The docs say:
Seems like we've most cases covered. |
They would only be needed if people want to cast shadows and are doing custom vertex manipulation / animation or custom fragment discard logic with a ShaderMaterial, I think. It seems like we could remove cases (b), (c), and (d) from the docs. |
Other use cases:
|
Fixes #4744
Description
Used #22287 as reference.
Screen.Recording.2021-08-24.at.6.26.11.PM.mov