Skip to content

Commit 4f8e27a

Browse files
authored
Fix 1.1.1: metal edge tint weight and thin-walled geometry flag (#300)
Two bug fixes for the 1.1.1 point release: - Metal edge tint incorrectly multiplied by specular_weight (cherry-picked from #240): the color82 (edge tint) input on metal_bsdf and metal_bsdf_tf was routed through a multiply node that applied specular_weight. Since the whole lobe is already weighted by specular_weight, the edge tint was being double-weighted. Now connects directly to the specular_color interface input. - Connect geometry_thin_walled flag to <surface> (borrowed from AcademySoftwareFoundation/MaterialX#2759): the thin-walled geometry flag was not being passed through to the surface node in the MaterialX graph.
1 parent 0f45657 commit 4f8e27a

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

reference/open_pbr_surface.mtlx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
doc="The color of the emitted light." />
7878
<input name="geometry_opacity" type="float" value="1" uimin="0" uimax="1" uiname="Opacity" uifolder="Geometry" hint="opacity"
7979
doc="The opacity of the entire material." />
80-
<input name="geometry_thin_walled" type="boolean" value="false" uiname="Thin Walled" uifolder="Geometry" uiadvanced="true"
80+
<input name="geometry_thin_walled" type="boolean" value="false" uniform="true" uiname="Thin Walled" uifolder="Geometry" uiadvanced="true"
8181
doc="If true the surface is double-sided and represents an infinitesimally thin shell. Suitable for extremely geometrically thin objects such as leaves or paper." />
8282
<input name="geometry_normal" type="vector3" defaultgeomprop="Nworld" uiname="Normal" uifolder="Geometry"
8383
doc="Input geometric normal" />
@@ -424,22 +424,18 @@
424424
<input name="in1" type="color3" interfacename="base_color" />
425425
<input name="in2" type="float" interfacename="base_weight" />
426426
</multiply>
427-
<multiply name="metal_edgecolor" type="color3">
428-
<input name="in1" type="color3" interfacename="specular_color" />
429-
<input name="in2" type="float" interfacename="specular_weight" />
430-
</multiply>
431427
<generalized_schlick_bsdf name="metal_bsdf" type="BSDF">
432428
<input name="weight" type="float" interfacename="specular_weight" />
433429
<input name="color0" type="color3" nodename="metal_reflectivity" />
434-
<input name="color82" type="color3" nodename="metal_edgecolor" />
430+
<input name="color82" type="color3" interfacename="specular_color" />
435431
<input name="roughness" type="vector2" nodename="main_roughness" />
436432
<input name="normal" type="vector3" interfacename="geometry_normal" />
437433
<input name="tangent" type="vector3" interfacename="geometry_tangent" />
438434
</generalized_schlick_bsdf>
439435
<generalized_schlick_bsdf name="metal_bsdf_tf" type="BSDF">
440436
<input name="weight" type="float" interfacename="specular_weight" />
441437
<input name="color0" type="color3" nodename="metal_reflectivity" />
442-
<input name="color82" type="color3" nodename="metal_edgecolor" />
438+
<input name="color82" type="color3" interfacename="specular_color" />
443439
<input name="roughness" type="vector2" nodename="main_roughness" />
444440
<input name="normal" type="vector3" interfacename="geometry_normal" />
445441
<input name="tangent" type="vector3" interfacename="geometry_tangent" />
@@ -615,6 +611,7 @@
615611
<input name="bsdf" type="BSDF" nodename="fuzz_layer" />
616612
<input name="edf" type="EDF" nodename="emission_edf" />
617613
<input name="opacity" type="float" interfacename="geometry_opacity" />
614+
<input name="thin_walled" type="boolean" interfacename="geometry_thin_walled" />
618615
</surface>
619616

620617
<!-- Output -->

0 commit comments

Comments
 (0)