Skip to content

Commit b91ec7a

Browse files
authored
Fix sheen roughness in Standard Surface to glTF PBR translation (AcademySoftwareFoundation#2643)
closes AcademySoftwareFoundation#2642 **Sheen roughness** in glTF PBR is squared before the `sheen_bsdf` node compare to standard surface implementation. In this PR the translation graph is updated to take the sqrt of the sheen roughness from standard surface to make sure the intended sheen roughness is translated properly.
1 parent 078d91f commit b91ec7a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

libraries/bxdf/translation/standard_surface_to_gltf_pbr.mtlx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@
187187
<input name="in1" type="float" interfacename="sheen_roughness" />
188188
<input name="in2" type="float" value="0" />
189189
</ifgreater>
190+
<sqrt name="sqrt_sheen_roughness" type="float">
191+
<input name="in" type="float" nodename="sheen_roughness" />
192+
</sqrt>
190193

191194
<!-- Clearcoat -->
192195
<ifequal name="clearcoat" type="float">
@@ -257,7 +260,7 @@
257260
<output name="thickness_out" type="float" nodename="thickness" />
258261
<output name="attenuation_color_out" type="color3" nodename="attenuation_color" />
259262
<output name="sheen_color_out" type="color3" nodename="sheen_color" />
260-
<output name="sheen_roughness_out" type="float" nodename="sheen_roughness" />
263+
<output name="sheen_roughness_out" type="float" nodename="sqrt_sheen_roughness" />
261264
<output name="clearcoat_out" type="float" nodename="clearcoat" />
262265
<output name="clearcoat_roughness_out" type="float" nodename="clearcoat_roughness" />
263266
<output name="emissive_out" type="color3" nodename="emissive" />

0 commit comments

Comments
 (0)