Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion features/Hair Specular/Shaders/Hair/Hair.hlsli
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ namespace Hair
float cosThetaD = sqrt((1 + cosThetaL * cosThetaV + NdotV * NdotL) / 2.0);

const float3 Lp = L - NdotL * N;
const float3 Vp = V - NdotL * N;
const float3 Vp = V - NdotV * N;
const float cosPhi = dot(Lp, Vp) * rsqrt(dot(Lp, Lp) * dot(Vp, Vp) + EPSILON_DIVISION);
const float cosHalfPhi = sqrt(saturate(0.5 + 0.5 * cosPhi));

Expand Down
2 changes: 1 addition & 1 deletion package/Shaders/Common/PBR.hlsli
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ namespace PBR
float cosThetaD = sqrt((1 + cosThetaL * cosThetaV + NdotV * NdotL) / 2.0);

const float3 Lp = L - NdotL * N;
const float3 Vp = V - NdotL * N;
const float3 Vp = V - NdotV * N;
const float cosPhi = dot(Lp, Vp) * rsqrt(dot(Lp, Lp) * dot(Vp, Vp) + EPSILON_DIVISION);
const float cosHalfPhi = sqrt(saturate(0.5 + 0.5 * cosPhi));

Expand Down