mirror of https://github.com/xemu-project/xemu.git
Revert "nv2a/vsh: Use double precision in clip range remap"
This reverts commit 1a15d83c44
.
This commit is contained in:
parent
1a15d83c44
commit
50a5368f47
|
@ -776,15 +776,9 @@ void vsh_translate(uint16_t version,
|
|||
* Note this makes the values in the depth buffer wrong. This should be
|
||||
* handled with gl_ClipDistance instead, but that has performance issues
|
||||
* on OS X.
|
||||
*
|
||||
* This conversion is performed at double precision to handle max depth
|
||||
* clipping in the Xbox z24s8 floating point mode.
|
||||
*/
|
||||
" if (clipRange.y != clipRange.x) {\n"
|
||||
" double work = double(oPos.z - clipRange.x);\n"
|
||||
" double half_full_distance = 0.5 * double(clipRange.y - clipRange.x);\n"
|
||||
" oPos.z = float(work / half_full_distance);\n"
|
||||
" oPos.z = oPos.z - 1;\n"
|
||||
" oPos.z = (oPos.z - clipRange.x)/(0.5*(clipRange.y - clipRange.x)) - 1;\n"
|
||||
" }\n"
|
||||
|
||||
/* Correct for the perspective divide */
|
||||
|
@ -800,3 +794,4 @@ void vsh_translate(uint16_t version,
|
|||
);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue