Skip to content

Commit

Permalink
Fix the call to anisotropic_vdf closure in OSL (#2016)
Browse files Browse the repository at this point in the history
Update the implementation of `anisotropic_vdf` node to call the corresponding closure in OSL.
  • Loading branch information
niklasharrysson authored Sep 21, 2024
1 parent 0a5defa commit 80e1b56
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions libraries/pbrlib/genosl/mx_anisotropic_vdf.osl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
void mx_anisotropic_vdf(vector absorption, vector scattering, float anisotropy, output VDF vdf)
void mx_anisotropic_vdf(color absorption, color scattering, float anisotropy, output VDF vdf)
{
// TODO: Need to remap parameters to match the new closure,
// or change the MaterialX spec to OSL parameterization.
vdf = 0;
// Convert from absorption and scattering coefficients to
// extinction coefficient and single-scattering albedo.
color extinction = absorption + scattering;
color albedo = scattering / extinction;
vdf = anisotropic_vdf(albedo, extinction, anisotropy);
}

0 comments on commit 80e1b56

Please sign in to comment.