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

thin_film_bsdf separately fails compile due to undefined variables #1197

Closed
kwokcb opened this issue Jan 16, 2023 · 1 comment
Closed

thin_film_bsdf separately fails compile due to undefined variables #1197

kwokcb opened this issue Jan 16, 2023 · 1 comment

Comments

@kwokcb
Copy link
Contributor

kwokcb commented Jan 16, 2023

An edge case when trying to create shader code with just this node:

<?xml version="1.0"?>
<materialx version="1.38">
  <thin_film_bsdf name="thin_film_bsdf" type="BSDF">
    <input name="thickness" type="float" value="550" unittype="distance" unit="nanometer" />
    <input name="ior" type="float" value="1.5" />
    <output name="out" type="BSDF" />
  </thin_film_bsdf>
  <surface name="shader_thin_film_bsdf_out" type="surfaceshader">
    <input name="bsdf" type="BSDF" nodename="thin_film_bsdf" />
  </surface>
  <surfacematerial name="material_thin_film_bsdf_out" type="material">
    <input name="surfaceshader" type="surfaceshader" nodename="shader_thin_film_bsdf_out" />
  </surfacematerial>
</materialx>

Gives this GLSL error when accessing thin_film_bsdf_out.response.
Error also occurs for OSL so assume it's a generic code gen issue.

0(923) : error C1503: undefined variable "thin_film_bsdf_out"
0(932) : error C1503: undefined variable "thin_film_bsdf_out"
`` 
[thin_film_bsdf_ps.glsl.txt](https://github.com/AcademySoftwareFoundation/MaterialX/files/10428633/thin_film_bsdf_ps.glsl.txt)
@jstone-lucasfilm
Copy link
Member

This issue has been addressed in #1413 for the in-progress v1.39 of MaterialX, so let's go ahead and mark this as resolved.

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