Fix errors with final Z coordinate

This commit is contained in:
Luke Benstead 2020-05-24 09:55:13 +01:00
parent d932811be4
commit 7d4207eddb

View File

@ -944,9 +944,7 @@ GL_FORCE_INLINE void divide(SubmissionTarget* target) {
vertex->xyz[0] *= f;
vertex->xyz[1] *= f;
vertex->xyz[2] *= f;
vertex->xyz[2] = MATH_Fast_Invert(
vertex->xyz[2] * 0.5f + 0.525f
);
vertex->xyz[2] = MAX(1.0f - (vertex->xyz[2] * 0.5f + 0.5f), 0.0001f);
++vertex;
}
}