forked from AcademySoftwareFoundation/MaterialX
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d377d0e
commit 2598b6e
Showing
1 changed file
with
6 additions
and
4 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
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); | ||
} |