Skip to content

Commit

Permalink
docs: Fixes to documentation of new oren_nayar_diffuse_bsdf parameters (
Browse files Browse the repository at this point in the history
AcademySoftwareFoundation#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 <[email protected]>
  • Loading branch information
lgritz authored Jun 2, 2024
1 parent 9e3d7e4 commit 0d122e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/doc/languagespec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
\emph{[email protected]}
}
\date{{\large Date: 27 Oct 2023 \\
% (with corrections, 24 Nov 2021)
(with corrections, 24 May 2024)
}
\bigskip
\bigskip
Expand Down Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion src/doc/stdlib.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)`

Expand Down

0 comments on commit 0d122e7

Please sign in to comment.