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
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.
Description of Issue
Storm fails to shadergen the MaterialX unlit shader with the following error
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
skydome.zip
System Information (OS, Hardware)
macOS 14.4 M2 Macbook
Package Versions
USD 23.11 , 24.3
The text was updated successfully, but these errors were encountered: