NormalPass, SSAOPass: Enable passes to work with flat shading, back side material settings
See original GitHub issueIs 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!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
NormalPass, SSAOPass: Enable passes to work with flat shading ...
When setting a material to use "flatShading" or "BackSide" / "DoubleSide" SSAOPass does not currently work as expected because NormalPass does not respect...
Read more >Tutorial: Adding details with the Normal pass - SOA Academy
Add a Hue/Saturation adjustment on top of the Normal Pass. Link them together by clicking ALT+LeftClick between them. We're not going to use...
Read more >Shading Techniques - How to Shade with a Pencil
Learn basic shading techniques used to create the illusion of form, light, and shadow in drawings.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the report!
The
NormalPass
does make use of theOverrideMaterialManager
and theside
property should already be handled (see #265). TheflatShading
property is not supported yet. Handling this property will increase the amount of override materials from 9 to 18. This is, of course, awful, but I think this should be the last property that needs to be accounted for. The override material system is also about to become obsolete relatively soonish, now that the MRT PR has been merged.I’ll publish a fix for
flatShading
soon.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!