From fe2460239fefb7a33939a1e08e7905ee3c5d3eb0 Mon Sep 17 00:00:00 2001 From: Josef Date: Tue, 15 Jul 2025 11:46:37 +0200 Subject: [PATCH] Normal Blending Curve BugFix --- Runtime/Procedural/Mesh/MeshGeometry.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/Procedural/Mesh/MeshGeometry.cs b/Runtime/Procedural/Mesh/MeshGeometry.cs index 1036f89..61be192 100644 --- a/Runtime/Procedural/Mesh/MeshGeometry.cs +++ b/Runtime/Procedural/Mesh/MeshGeometry.cs @@ -496,7 +496,7 @@ namespace Rokojori for ( int i = 0; i < normals.Count; i++ ) { var yPositionAmount = MathX.RemapClamped( vertices[ i ].Y, startY, endY, 0, 1 ); - var blendAmount = curve.Sample( yPositionAmount ) * amount; + var blendAmount = ( curve == null ? 1f : curve.Sample( yPositionAmount ) ) * amount; blendAmount = MathX.Clamp01( blendAmount ); normals[ i ] = Math3D.BlendNormals( normals[ i ], direction, blendAmount ); }