Fix #111277: NaN in Vector Displacement leading to render errors #111294

Merged
Sergey Sharybin merged 2 commits from Alaska/blender:fix-111277 into main 2023-08-21 15:22:12 +02:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 31f72a9b1c - Show all commits

View File

@ -3,7 +3,7 @@ void node_vector_displacement_tangent(
{
vec3 oN = normalize(normal_world_to_object(g_data.N));
vec3 oT = normalize(normal_world_to_object(T.xyz));
vec3 oB = T.w * normalize(cross(oN, oT));
vec3 oB = T.w * safe_normalize(cross(oN, oT));
result = (vector.xyz - midlevel) * scale;
result = result.x * oT + result.y * oN + result.z * oB;