-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
NormalPass, SSAOPass: Enable passes to work with flat shading, back side material settings #292
Comments
Thanks for the report! The I'll publish a fix for |
Modified fiddle with override material workaround enabled: https://jsfiddle.net/8georca4/ |
Oops I missed that this needed to be explicitly enabled. Thanks!
I'm pretty excited for the improvements that MRT will bring but how do you anticipate it removing the need for an override workaround system? Three.js' |
The workaround attempts to fix the shortcomings of the override material system, so it's only necessary because we use override materials. With MRT we should be able to render geometry data (normals, positions, roughness, etc.) into additional buffers during the initial Three's current built-in materials are quite rigid and hard to extend. I think we still have to wait for NodeMaterials and declarative shader manipulation features to actually make effective use of MRT in the |
Fixed in |
Yes I'm excited to see what Node materials bring. I think they'll be pretty enabling in a lot of ways. Thanks for the quick fix! |
Is your feature request related to a problem?
When setting a material to use "flatShading" or "BackSide" / "DoubleSide" SSAOPass does not currently work as expected because
NormalPass
does not respect those settings in the override material.Describe the solution you'd like
NormalPass
should use the "OverrideMaterialManager" and respect the original material "flatShading" and "side" properties.Describe alternatives you've considered
None
Additional context
Here's a JSFiddle showing the current NormalPass results with the above material settings. The left cube uses "flatShading" with no normals while the right cube is using "side = BackSide":
https://jsfiddle.net/z4759qL8/1/
Thanks!
The text was updated successfully, but these errors were encountered: