Fix: Texture Coordinate normals are not normalized in Cycles OSL

The output normals of the Texture Coordinate node when using the OSL
backend were not normalized, leading to incorrect values in
some situations.

This commit fixes this issue by normalizing the normals in this situation.

Pull Request: https://projects.blender.org/blender/blender/pulls/132514
This commit is contained in:
Alaska
2025-01-02 03:40:55 +01:00
committed by Alaska
parent d53d7a42df
commit 0bfb6e41f2

View File

@@ -63,7 +63,7 @@ shader node_texture_coordinate(
}
Camera = transform("camera", P);
Window = transform("NDC", P);
Normal = transform("world", "object", N);
Normal = normalize(transform("world", "object", N));
Reflection = -reflect(I, N);
}