Skip to content
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

Improve UsdPreviewSurface shading logic #1082

Conversation

pablode
Copy link
Contributor

@pablode pablode commented Sep 17, 2022

I've compared parts of MaterialX's UsdPreviewSurface BSDF implementation against Pixar's current shading logic and believe to have found some discrepancies:

Commit be438a4 addresses the calculation of F0 and F90 values for the specular BSDF when the metallic workflow is selected. It now implements the reference logic:
https://github.com/PixarAnimationStudios/USD/blob/3abc46452b1271df7650e9948fef9f0ce602e3b2/pxr/usdImaging/plugin/usdShaders/shaders/previewSurface.glslfx#L219-L227

Commit 25fb016 properly attenuates the weight of the diffuse BSDF when the metallic workflow is selected: https://github.com/PixarAnimationStudios/USD/blob/3abc46452b1271df7650e9948fef9f0ce602e3b2/pxr/usdImaging/plugin/usdShaders/shaders/previewSurface.glslfx#L229-L230

Commit dd4eba2 changes the clearcoat layer implementation to Pixar's reference logic:
https://github.com/PixarAnimationStudios/USD/blob/3abc46452b1271df7650e9948fef9f0ce602e3b2/pxr/usdImaging/plugin/usdShaders/shaders/previewSurface.glslfx#L247-L252

@pablode pablode changed the title Fix incorrect UsdPreviewSurface shading logic for metalness workflow Improve UsdPreviewSurface shading logic Sep 17, 2022
Copy link
Member

@jstone-lucasfilm jstone-lucasfilm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good to me, thanks @pablode!

@jstone-lucasfilm jstone-lucasfilm merged commit f9cf894 into AcademySoftwareFoundation:main Sep 29, 2022
Michaelredaa pushed a commit to Michaelredaa/MaterialX that referenced this pull request Oct 21, 2023
This changelist fixes discrepancies between the MaterialX graph for UsdPreviewSurface and Pixar's current shading logic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants