Fix Cycles rare assert in ensure_valid_specular_reflection

When the incoming direction is exactly orthogonal to the normal

Ref #115071
This commit is contained in:
Brecht Van Lommel 2023-11-21 18:38:45 +01:00
parent 8a75b54735
commit 8845dba79d
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ ccl_device float3 ensure_valid_specular_reflection(float3 Ng, float3 I, float3 N
const float3 R = 2 * dot(N, I) * N - I;
const float Iz = dot(I, Ng);
kernel_assert(Iz > 0);
kernel_assert(Iz >= 0);
/* Reflection rays may always be at least as shallow as the incoming ray. */
const float threshold = min(0.9f * Iz, 0.01f);