- normalize the normal vector in the vertex shader because our vertex attribute uses a low precision format (10 bits)

This commit is contained in:
Magnus Norddahl 2017-04-14 02:01:27 +02:00
parent 4e14ed4e9e
commit 2000784307

View file

@ -62,7 +62,7 @@ void main()
gl_ClipDistance[4] = worldcoord.y + ((uSplitBottomPlane.w + uSplitBottomPlane.x * worldcoord.x + uSplitBottomPlane.y * worldcoord.z) * uSplitBottomPlane.z);
}
vWorldNormal = NormalModelMatrix * aNormal;
vWorldNormal = NormalModelMatrix * normalize(aNormal);
vEyeNormal = NormalViewMatrix * vWorldNormal;
#endif