mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2025-01-09 08:10:07 +00:00
Fixed glViewer triangle normal calculation
The normal computed for primitive triangles had a flipped orientation in the glViewer, This caused linear approximating patches to be shaded incorrectly for adaptively refined Loop meshes, and similarly triangles resulting from uniformly refined Loop meshes.
This commit is contained in:
parent
db9c01e7e0
commit
973b7fe7a5
@ -324,8 +324,8 @@ void main()
|
||||
#endif // PRIM_QUAD
|
||||
|
||||
#ifdef PRIM_TRI
|
||||
vec3 A = (inpt[1].v.position - inpt[0].v.position).xyz;
|
||||
vec3 B = (inpt[2].v.position - inpt[0].v.position).xyz;
|
||||
vec3 A = (inpt[0].v.position - inpt[1].v.position).xyz;
|
||||
vec3 B = (inpt[2].v.position - inpt[1].v.position).xyz;
|
||||
vec3 n0 = normalize(cross(B, A));
|
||||
|
||||
#if defined(GEOMETRY_OUT_WIRE) || defined(GEOMETRY_OUT_LINE)
|
||||
|
Loading…
Reference in New Issue
Block a user