View3D: Grid: Don't make the Zaxis produce any fragment is not needed

This was a bug that was making the grid drawing even more slower than it
is.
This commit is contained in:
Clément Foucault
2018-12-03 00:38:29 +01:00
parent 24fd03d0c2
commit 82f01c666f

View File

@@ -53,10 +53,10 @@ void main()
/* Used for additional Z axis */
if ((gridFlag & CLIP_Z_POS) != 0) {
realPos.z = max(realPos.z, 0.0);
realPos.z = clamp(realPos.z, 0.0, 1e30);
}
if ((gridFlag & CLIP_Z_NEG) != 0) {
realPos.z = min(-realPos.z, 0.0);
realPos.z = clamp(realPos.z, -1e30, 0.0);
}
gl_Position = ViewProjectionMatrix * vec4(realPos, 1.0);