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

MDL : code generation for nodegraph with multiple surfaceshader output son a creates invalid code #1135

Open
bernardkwok opened this issue Mar 10, 2021 · 0 comments
Labels
Defect Defect fix ShaderGen Shader Generation change required

Comments

@bernardkwok
Copy link

bernardkwok commented Mar 10, 2021

A functional nodegraph for a nodedef with multiple surfaceshader outputs creates a procedure with a struct of multiple materials in MDL. This is considered to be invalid. (Tested with mdlc). For the same graph which is not an implementation a single material is evaluated and does not encounter this issue.

Example failing input file:

transparency_nodedef_test.mtlx.txt

Generated code:

ss_opacity_mapped_out.genmdl.mdl.txt

Error file:

ss_opacity_mapped_out.genmdl.mdl_compile_errors.txt

Namely the errors are:

  • Error C240: structure fields of type 'material' are forbidden
  • Error C207: variables of type 'material' are forbidden

Passing file:
transparency_test.mtlx.txt

@bernardkwok bernardkwok added Defect Defect fix ShaderGen Shader Generation change required labels Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Defect fix ShaderGen Shader Generation change required
Projects
None yet
Development

No branches or pull requests

1 participant