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

Autodesk: Fix for shader compile error with mx::heighttonormal nodes #2474

Merged

Conversation

erikaharrison-adsk
Copy link
Contributor

@erikaharrison-adsk erikaharrison-adsk commented Jun 6, 2023

When we use MaterialX heighttonormal node to convert a height map to normal map, Storm reports a shader error. error C7522: OpenGL requires constants to be initialized

The root cause is that the filter kernels are uninitialized

const float c_box_filter_weights[84];
const float c_gaussian_filter_weights[84];

Also logged as USD github issue #2281

Description of Change(s)

Ensure blur filters are initialized correctly by MaterialX glslfx codegen

Fixes Issue(s)

  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

When we use MaterialX heighttonormal node to convert a height map to normal map, Storm reports a shader error.
error C7522: OpenGL requires constants to be initialized

The root cause is that the filter kernels are uninitialized

const float c_box_filter_weights[84];
const float c_gaussian_filter_weights[84];

Also logged as USD github issue
PixarAnimationStudios#2281
@jesschimein
Copy link
Contributor

Filed as internal issue #USD-8404

@erikaharrison-adsk erikaharrison-adsk changed the title Fix for shader compile error with mx::heighttonormal nodes Autodesk: Fix for shader compile error with mx::heighttonormal nodes Jun 16, 2023
@ashwinbhat
Copy link
Contributor

Tagging @klucknav for visibility. Thanks

@ashwinbhat
Copy link
Contributor

ashwinbhat commented Oct 20, 2023

Update:
This PR requires MaterialX [PR 1576] (AcademySoftwareFoundation/MaterialX#1576)

Without the MaterialX PR, MacOS metal results will fail, but Windows/Linux are ok.
With the MaterialX PR, Test should pass on all platforms.

2023-10-19_20-51-38

FYI: @jesschimein

@pixar-oss pixar-oss merged commit c3ea65c into PixarAnimationStudios:dev Nov 1, 2023
@erikaharrison-adsk erikaharrison-adsk deleted the adsk/bugfix/heightmapfix branch December 1, 2023 22:45
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.

4 participants