From 0d122e781c8b90ff0a8c35ec270d53ac61e16c73 Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Sat, 1 Jun 2024 18:47:57 -0700 Subject: [PATCH] docs: Fixes to documentation of new oren_nayar_diffuse_bsdf parameters (#1820) Fixes to documentation of new oren_nayar_diffuse_bsdf parameters * The new parameter was explained, but not added to the function prototype in the docs. * The semi-deprecated languagespec.tex was fixed, but it slipped our minds that we've shifted the docs to markdown for ReadTheDocs (the real place we should have changed was stdlib.md). Signed-off-by: Larry Gritz --- src/doc/languagespec.tex | 4 ++-- src/doc/stdlib.md | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/doc/languagespec.tex b/src/doc/languagespec.tex index db9bc9c6e..206b35b04 100644 --- a/src/doc/languagespec.tex +++ b/src/doc/languagespec.tex @@ -67,7 +67,7 @@ \emph{lg@imageworks.com} } \date{{\large Date: 27 Oct 2023 \\ -% (with corrections, 24 Nov 2021) + (with corrections, 24 May 2024) } \bigskip \bigskip @@ -4640,7 +4640,7 @@ \section{Material Closures} \subsection{Surface BSDF closures} -\apiitem{\closurecolor\ {\ce oren_nayar_diffuse_bsdf}(normal N, color albedo, float roughness)} +\apiitem{\closurecolor\ {\ce oren_nayar_diffuse_bsdf}(normal N, color albedo, float roughness, int energy_compensation=0)} \indexapi{oren_nayar_diffuse_bsdf()} Constructs a diffuse reflection BSDF based on the Oren-Nayar reflectance diff --git a/src/doc/stdlib.md b/src/doc/stdlib.md index 1e085729e..289bd9356 100644 --- a/src/doc/stdlib.md +++ b/src/doc/stdlib.md @@ -1267,7 +1267,7 @@ properties of the physically-based shading nodes of MaterialX v1.38 ### Surface BSDF closures -`closure color` **`oren_nayar_diffuse_bsdf`** `(normal N, color albedo, float roughness)` +`closure color` **`oren_nayar_diffuse_bsdf`** `(normal N, color albedo, float roughness, int energy_compensation=0)` : Constructs a diffuse reflection BSDF based on the Oren-Nayar reflectance model. @@ -1283,10 +1283,14 @@ properties of the physically-based shading nodes of MaterialX v1.38 `roughness` : Surface roughness [0,1]. A value of 0.0 gives Lambertian reflectance. + `energy_compensation` + : Optional int parameter to select if energy compensation should be applied. + The Oren-Nayar reflection model is described in M. Oren and S. K. Nayar, "Generalization of Lambert's Reflectance Model," Proceedings of SIGGRAPH 1994, pp.239-246 (July, 1994). + The energy compensated model is described in the white paper: "An energy-preserving Qualitative Oren-Nayar model" by Jamie Portsmouth. `closure color` **`burley_diffuse_bsdf`** `(normal N, color albedo, float roughness)`