- renormalize normals on scaled models

This commit is contained in:
Rachael Alexanderson 2025-02-22 13:22:41 -05:00
parent cb4acf9192
commit 538f62a556
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0

View file

@ -94,8 +94,8 @@ void main()
ClipDistance4 = worldcoord.y - ((uSplitBottomPlane.w + uSplitBottomPlane.x * worldcoord.x + uSplitBottomPlane.y * worldcoord.z) * uSplitBottomPlane.z);
}
vWorldNormal = NormalModelMatrix * vec4(normalize(bones.Normal), 1.0);
vEyeNormal = NormalViewMatrix * vec4(normalize(vWorldNormal.xyz), 1.0);
vWorldNormal = vec4(normalize((NormalModelMatrix * vec4(normalize(bones.Normal), 1.0)).xyz), 1.0);
vEyeNormal = vec4(normalize((NormalViewMatrix * vec4(normalize(vWorldNormal.xyz), 1.0)).xyz), 1.0);
#endif
#ifdef SPHEREMAP