Skip to content

Commit

Permalink
Fix inconsistent use of uniform flag on gltf nodes (#1159)
Browse files Browse the repository at this point in the history
This change list adds a missing uniform flag to interface inputs which are connected to uniform inputs on internal nodes. An inconsistent use of the uniform flag will cause compilation of generated MDL code to failed, since MDL is strict about the use of the uniform keyword in source code.
  • Loading branch information
niklasharrysson authored Dec 1, 2022
1 parent f7a735f commit 994c51e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions libraries/bxdf/gltf_pbr.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
<nodedef name="ND_gltf_colorimage" node="gltf_colorimage" version="1.0" isdefaultversion="true" nodegroup="texture2d">
<input name="file" type="filename" uniform="true" value="" uifolder="Image" />
<input name="default" type="color4" value="0, 0, 0, 0" uifolder="Image" />
<input name="uvindex" type="integer" value="0" uifolder="Image" />
<input name="uvindex" type="integer" uniform="true" value="0" uifolder="Image" />
<input name="pivot" type="vector2" value="0, 1" uifolder="Image" />
<input name="scale" type="vector2" value="1, 1" uifolder="Image" />
<input name="rotate" type="float" value="0" unit="degree" unittype="angle" uimin="0" uimax="360" uifolder="Image" />
Expand All @@ -378,7 +378,7 @@
<gltf_image name="image" type="color4">
<input name="file" type="filename" uniform="true" interfacename="file" />
<input name="default" type="color4" interfacename="default" />
<input name="uvindex" type="integer" interfacename="uvindex" />
<input name="uvindex" type="integer" uniform="true" interfacename="uvindex" />
<input name="pivot" type="vector2" interfacename="pivot" />
<input name="scale" type="vector2" interfacename="scale" />
<input name="rotate" type="float" interfacename="rotate" />
Expand Down Expand Up @@ -419,7 +419,7 @@
<input name="file" type="filename" uniform="true" value="" />
<input name="factor" type="color3" value="1,1,1" />
<input name="default" type="color3" value="0, 0, 0" />
<input name="uvindex" type="integer" value="0" />
<input name="uvindex" type="integer" uniform="true" value="0" />
<input name="pivot" type="vector2" value="0, 1" />
<input name="scale" type="vector2" value="1, 1" />
<input name="rotate" type="float" value="0" unit="degree" unittype="angle" uimin="0" uimax="360" />
Expand Down Expand Up @@ -477,7 +477,7 @@
<input name="file" type="filename" uniform="true" value="" />
<input name="factor" type="color4" value="1,1,1,1" />
<input name="default" type="color4" value="0, 0, 0, 0" />
<input name="uvindex" type="integer" value="0" />
<input name="uvindex" type="integer" uniform="true" value="0" />
<input name="pivot" type="vector2" value="0, 1" />
<input name="scale" type="vector2" value="1, 1" />
<input name="rotate" type="float" value="0" unit="degree" unittype="angle" uimin="0" uimax="360" />
Expand Down Expand Up @@ -535,7 +535,7 @@
<input name="file" type="filename" uniform="true" value="" />
<input name="factor" type="float" value="1" />
<input name="default" type="float" value="0" />
<input name="uvindex" type="integer" value="0" />
<input name="uvindex" type="integer" uniform="true" value="0" />
<input name="pivot" type="vector2" value="0, 1" />
<input name="scale" type="vector2" value="1, 1" />
<input name="rotate" type="float" value="0" unit="degree" unittype="angle" uimin="0" uimax="360" />
Expand Down Expand Up @@ -592,7 +592,7 @@
<nodedef name="ND_gltf_image_vector3_vector3_1_0" node="gltf_image" version="1.0" isdefaultversion="true" nodegroup="texture2d">
<input name="file" type="filename" uniform="true" value="" />
<input name="default" type="vector3" value="0, 0, 0" />
<input name="uvindex" type="integer" value="0" />
<input name="uvindex" type="integer" uniform="true" value="0" />
<input name="pivot" type="vector2" value="0, 1" />
<input name="scale" type="vector2" value="1, 1" />
<input name="rotate" type="float" value="0" unit="degree" unittype="angle" uimin="0" uimax="360" />
Expand Down Expand Up @@ -645,7 +645,7 @@
<nodedef name="ND_gltf_normalmap_vector3_1_0" node="gltf_normalmap" version="1.0" isdefaultversion="true" nodegroup="texture2d">
<input name="file" type="filename" uniform="true" value="" />
<input name="default" type="vector3" value="0.5, 0.5, 1" />
<input name="uvindex" type="integer" value="0" />
<input name="uvindex" type="integer" uniform="true" value="0" />
<input name="pivot" type="vector2" value="0, 1" />
<input name="scale" type="vector2" value="1, 1" />
<input name="rotate" type="float" value="0" unit="degree" unittype="angle" uimin="0" uimax="360" />
Expand Down Expand Up @@ -701,7 +701,7 @@
<nodedef name="ND_gltf_iridescence_thickness_float_1_0" node="gltf_iridescence_thickness" version="1.0" isdefaultversion="true" nodegroup="texture2d">
<input name="file" type="filename" uniform="true" value="" uifolder="Image" />
<input name="default" type="vector3" value="0, 0, 0" uifolder="Image" />
<input name="uvindex" type="integer" value="0" uifolder="Image" />
<input name="uvindex" type="integer" uniform="true" value="0" uifolder="Image" />
<input name="pivot" type="vector2" value="0, 0" uifolder="Image" />
<input name="scale" type="vector2" value="1, 1" uifolder="Image" />
<input name="rotate" type="float" value="0" uifolder="Image" />
Expand All @@ -722,7 +722,7 @@
<gltf_image name="thickness_image" type="vector3">
<input name="file" type="filename" uniform="true" interfacename="file" />
<input name="default" type="vector3" interfacename="default" />
<input name="uvindex" type="integer" interfacename="uvindex" />
<input name="uvindex" type="integer" uniform="true" interfacename="uvindex" />
<input name="pivot" type="vector2" interfacename="pivot" />
<input name="scale" type="vector2" interfacename="scale" />
<input name="rotate" type="float" interfacename="rotate" />
Expand Down

0 comments on commit 994c51e

Please sign in to comment.