You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of today, our GLSL implementation of mx_forward_facing_normal uses the per-pixel shading normal to compute whether a surface is forward or back-facing, flipping that same per-pixel normal when the surface is found to be back-facing:
Ideally, we should be using the geometric normal to test the facing of the surface, flipping the per-pixel shading normal when the dot product between the geometric normal and view direction is negative. See the OSL codebase for a good reference of this approach:
The text was updated successfully, but these errors were encountered:
jstone-lucasfilm
changed the title
Reference geometric normal in mx_face_forward_normal
Reference geometric normal in mx_forward_facing_normalJan 3, 2025
As of today, our GLSL implementation of
mx_forward_facing_normal
uses the per-pixel shading normal to compute whether a surface is forward or back-facing, flipping that same per-pixel normal when the surface is found to be back-facing:MaterialX/libraries/pbrlib/genglsl/lib/mx_microfacet.glsl
Line 56 in d114ab7
Ideally, we should be using the geometric normal to test the facing of the surface, flipping the per-pixel shading normal when the dot product between the geometric normal and view direction is negative. See the OSL codebase for a good reference of this approach:
https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/blob/71dd75945f5257f00ecac1fe151901e81410680b/src/shaders/stdosl.h#L204
The text was updated successfully, but these errors were encountered: