-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore isotropic fallback for roughness_dual
- Loading branch information
1 parent
5ee03bb
commit f60538f
Showing
2 changed files
with
8 additions
and
0 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,5 +1,9 @@ | ||
void mx_roughness_dual(vec2 roughness, out vec2 result) | ||
{ | ||
if (roughness.y < 0.0) | ||
{ | ||
roughness.y = roughness.x; | ||
} | ||
result.x = clamp(roughness.x * roughness.x, M_FLOAT_EPS, 1.0); | ||
result.y = clamp(roughness.y * roughness.y, M_FLOAT_EPS, 1.0); | ||
} |
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,5 +1,9 @@ | ||
void mx_roughness_dual(vector2 roughness, output vector2 result) | ||
{ | ||
if (roughness.y < 0.0) | ||
{ | ||
roughness.y = roughness.x; | ||
} | ||
result.x = clamp(roughness.x * roughness.x, M_FLOAT_EPS, 1.0); | ||
result.y = clamp(roughness.y * roughness.y, M_FLOAT_EPS, 1.0); | ||
} |