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:
parent
69ec85e624
commit
4031ee211a
|
@ -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\
|
||||
"};
|
||||
|
|
|
@ -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\
|
||||
"};
|
||||
|
|
Loading…
Reference in New Issue