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

Issue about the shadowOcclusion variable in Storm in materialXShaderGen.cpp #3491

Open
lanierd-adsk opened this issue Jan 23, 2025 · 1 comment

Comments

@lanierd-adsk
Copy link

lanierd-adsk commented Jan 23, 2025

Hi,

In HdStorm, when creating a shader on the fly for a MaterialX material network, I think there is a mistake in the light loop string.
The actual LightData structure instance in the shader is called "$lightData" not "u_lightData".

And, in this cpp file, there are 3 instances of the variable "u_lightData" related to shadowOcclusion in different strings.
So I think the 3 instances of "u_lightData"should be replaced by "u_lightData" to be correct.

As an example, here is the shader generated for a MaterialX standard surface :
HydraToMaterialXShader.txt

And you can see that the LightData struct is instantiated as :
LightData $lightData[MAX_LIGHT_SOURCES];

But line 267 you get :
u_lightData[u_numActiveLightSources].shadowOcclusion =

And u_lightData is not defined but is used line 267, and 270 and 1734.

Thank you.
Regards,
David Lanier
Autodesk

@jesschimein
Copy link
Collaborator

Filed as internal issue #USD-10591

(This is an automated message. See here for more information.)

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