Skip to content

Commit

Permalink
Consider subsurface color in dielectric albedo
Browse files Browse the repository at this point in the history
  • Loading branch information
JGamache-autodesk committed Nov 5, 2024
1 parent bef88b9 commit d18967e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libraries/bxdf/translation/standard_surface_to_usd.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<input name="coat" type="float" value="0" />
<input name="coat_color" type="color3" value="1, 1, 1" />
<input name="coat_roughness" type="float" value="0.1" />
<input name="subsurface" type="float" value="0" />
<input name="subsurface_color" type="color3" value="1, 1, 1" />
<input name="emission" type="float" value="0" />
<input name="emission_color" type="color3" value="1, 1, 1" />
<input name="opacity" type="color3" value="1, 1, 1" />
Expand Down Expand Up @@ -47,13 +49,18 @@
<input name="in1" type="color3" interfacename="base_color" />
<input name="in2" type="float" interfacename="base" />
</multiply>
<mix name="albedoOpaqueDielectric" type="color3">
<input name="fg" type="color3" interfacename="subsurface_color" />
<input name="bg" type="color3" nodename="scaledBaseColor" />
<input name="mix" type="float" interfacename="subsurface" />
</mix>
<mix name="coatAttenuation" type="color3">
<input name="fg" type="color3" interfacename="coat_color" />
<input name="bg" type="color3" value="1.0, 1.0, 1.0" />
<input name="mix" type="float" interfacename="coat" />
</mix>
<multiply name="diffuseColor" type="color3">
<input name="in1" type="color3" nodename="scaledBaseColor" />
<input name="in1" type="color3" nodename="albedoOpaqueDielectric" />
<input name="in2" type="color3" nodename="coatAttenuation" />
</multiply>
<dot name="roughness" type="float">
Expand Down

0 comments on commit d18967e

Please sign in to comment.