nv2a: Fix clip range scaling precision loss

This commit is contained in:
Matt Borgerson 2021-03-03 17:10:30 -07:00 committed by mborgerson
parent 76272d306b
commit fc73893f3c
1 changed files with 1 additions and 1 deletions

View File

@ -774,7 +774,7 @@ void vsh_translate(uint16_t version,
* on OS X.
*/
" if (clipRange.y != clipRange.x) {\n"
" oPos.z = (oPos.z - 0.5 * (clipRange.x + clipRange.y)) / (0.5 * (clipRange.y - clipRange.x));\n"
" oPos.z = (oPos.z - clipRange.x)/(0.5*(clipRange.y - clipRange.x)) - 1;\n"
" }\n"
/* Correct for the perspective divide */