forked from AcademySoftwareFoundation/MaterialX
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GLSL improvements to Oren-Nayar diffuse (AcademySoftwareFoundation#1756)
- Remove an extra factor of PI in the GLSL computation of Oren-Nayar diffuse, improving its alignment with corresponding implementations in OSL and MDL. - Include the required directional albedo factor when computing GLSL environment lighting for Oren-Nayar diffuse. - Add an analytic approximation for the directional albedo of Oren-Nayar diffuse, using a rational quadratic fit to Monte Carlo data. - Generalize the interfaces of mx_oren_nayar_diffuse and mx_burley_diffuse, enabling their use in tangent-space computations.
- Loading branch information
1 parent
5903479
commit 8cb9ae1
Showing
6 changed files
with
134 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
resources/Materials/TestSuite/pbrlib/bsdf/diffuse_brdf.mtlx
This file was deleted.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
resources/Materials/TestSuite/pbrlib/bsdf/oren_nayar_diffuse.mtlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0"?> | ||
<materialx version="1.38"> | ||
<nodegraph name="oren_nayar_diffuse"> | ||
|
||
<oren_nayar_diffuse_bsdf name="diffuse1" type="BSDF"> | ||
<input name="color" type="color3" value="0.6, 0.6, 0.6" /> | ||
<input name="roughness" type="float" value="0.0" /> | ||
</oren_nayar_diffuse_bsdf> | ||
<surface name="surface1" type="surfaceshader"> | ||
<input name="bsdf" type="BSDF" nodename="diffuse1" /> | ||
</surface> | ||
<output name="out1" type="surfaceshader" nodename="surface1" /> | ||
|
||
<oren_nayar_diffuse_bsdf name="diffuse2" type="BSDF"> | ||
<input name="color" type="color3" value="0.6, 0.6, 0.6" /> | ||
<input name="roughness" type="float" value="0.25" /> | ||
</oren_nayar_diffuse_bsdf> | ||
<surface name="surface2" type="surfaceshader"> | ||
<input name="bsdf" type="BSDF" nodename="diffuse2" /> | ||
</surface> | ||
<output name="out2" type="surfaceshader" nodename="surface2" /> | ||
|
||
<oren_nayar_diffuse_bsdf name="diffuse3" type="BSDF"> | ||
<input name="color" type="color3" value="0.6, 0.6, 0.6" /> | ||
<input name="roughness" type="float" value="0.5" /> | ||
</oren_nayar_diffuse_bsdf> | ||
<surface name="surface3" type="surfaceshader"> | ||
<input name="bsdf" type="BSDF" nodename="diffuse3" /> | ||
</surface> | ||
<output name="out3" type="surfaceshader" nodename="surface3" /> | ||
|
||
<oren_nayar_diffuse_bsdf name="diffuse4" type="BSDF"> | ||
<input name="color" type="color3" value="0.6, 0.6, 0.6" /> | ||
<input name="roughness" type="float" value="0.75" /> | ||
</oren_nayar_diffuse_bsdf> | ||
<surface name="surface4" type="surfaceshader"> | ||
<input name="bsdf" type="BSDF" nodename="diffuse4" /> | ||
</surface> | ||
<output name="out4" type="surfaceshader" nodename="surface4" /> | ||
|
||
<oren_nayar_diffuse_bsdf name="diffuse5" type="BSDF"> | ||
<input name="color" type="color3" value="0.6, 0.6, 0.6" /> | ||
<input name="roughness" type="float" value="1.0" /> | ||
</oren_nayar_diffuse_bsdf> | ||
<surface name="surface5" type="surfaceshader"> | ||
<input name="bsdf" type="BSDF" nodename="diffuse5" /> | ||
</surface> | ||
<output name="out5" type="surfaceshader" nodename="surface5" /> | ||
|
||
</nodegraph> | ||
</materialx> |
6 changes: 3 additions & 3 deletions
6
...s/TestSuite/pbrlib/bsdf/diffuse_btdf.mtlx → ...stSuite/pbrlib/bsdf/translucent_bsdf.mtlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters