OGLRender:

- Revert depth buffer calculation change in r5133 for the z-buffer mode. Keep the w-buffer mode change, since that’s the one that works. Fixes the buttons in Blazer Drive. (Regression from r5133.)
This commit is contained in:
rogerman 2015-03-26 11:01:27 +00:00
parent 69ec85e624
commit 4031ee211a
2 changed files with 4 additions and 2 deletions

View File

@ -331,7 +331,8 @@ static const char *fragmentShader_100 = {"\
discard; \n\
} \n\
\n\
gl_FragDepth = (oglWBuffer) ? vtxPosition.w/4096.0 : vtxPosition.z/4096.0; \n\
float vertW = (vtxPosition.w == 0.0f) ? 0.00000001f : vtxPosition.w; \n\
gl_FragDepth = (oglWBuffer) ? vtxPosition.w/4096.0 : (vtxPosition.z / vertW) * 0.5 + 0.5; \n\
gl_FragColor = fragColor; \n\
} \n\
"};

View File

@ -181,7 +181,8 @@ static const char *fragmentShader_150 = {"\
discard; \n\
} \n\
\n\
gl_FragDepth = (oglWBuffer) ? vtxPosition.w/4096.0 : vtxPosition.z/4096.0; \n\
float vertW = (vtxPosition.w == 0.0f) ? 0.00000001f : vtxPosition.w; \n\
gl_FragDepth = (oglWBuffer) ? vtxPosition.w/4096.0 : (vtxPosition.z / vertW) * 0.5 + 0.5; \n\
outFragColor = fragColor; \n\
} \n\
"};