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

Unlit Surface does not work in Storm #3015

Open
dgovil opened this issue Mar 25, 2024 · 2 comments
Open

Unlit Surface does not work in Storm #3015

dgovil opened this issue Mar 25, 2024 · 2 comments

Comments

@dgovil
Copy link
Collaborator

dgovil commented Mar 25, 2024

Description of Issue

Storm fails to shadergen the MaterialX unlit shader with the following error

Warning: in _ValidateCompilation at line 229 of /Users/dhruvgovil/Projects/usd/pxr/imaging/hdSt/glslProgram.cpp -- Failed to compile shader (FRAGMENT_SHADER): program_source:1619:5: error: use of undeclared identifier 'u_viewPosition'
    u_viewPosition = vec3(HdGet_worldToViewInverseMatrix() * vec4(0.0, 0.0, 0.0, 1.0));
    ^

This appears to be caused by the shadergen assuming that the uniform which is added in MaterialXGenGlsl/Nodes/SurfaceNodeGlsl.cpp, line 64 is available.
However, the unlit surface is using MaterialXGenGlsl/Nodes/UnlitSurfaceNodeGlsl.cpp which doesn't add this uniform.

So it seems like unlit or other shaders that do not output that constant will not work as a result.

Steps to Reproduce

  1. Open the attached file in usdview
    skydome.zip
  2. Look in the command line to see the error above

System Information (OS, Hardware)

macOS 14.4 M2 Macbook

Package Versions

USD 23.11 , 24.3

@jesschimein
Copy link
Contributor

Filed as internal issue #USD-9483

@dgovil
Copy link
Collaborator Author

dgovil commented Apr 17, 2024

This will be resolved by #3045

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

No branches or pull requests

2 participants