mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Fix depth_compare shader:
always write depth to buffer when otherMode.depthCompare flag is off. Up shader storage version. Fixed 2 players mode in Extreme-G XG2 (U) with N64 depth compare enabled, #1963
This commit is contained in:
parent
a5fc0689ac
commit
cb0cf5bed9
|
@ -1975,7 +1975,7 @@ public:
|
|||
" bool bFarther = (curZ + dzMin) >= bufZ; \n"
|
||||
" bool bNearer = (curZ - dzMin) <= bufZ; \n"
|
||||
" bool bMax = bufZ == 1.0; \n"
|
||||
" bool bRes; \n"
|
||||
" bool bRes = false; \n"
|
||||
" switch (uDepthMode) { \n"
|
||||
" case 1: \n"
|
||||
" bRes = bMax || bNearer; \n"
|
||||
|
@ -1987,10 +1987,8 @@ public:
|
|||
" case 3: \n"
|
||||
" bRes = bFarther && bNearer && !bMax; \n"
|
||||
" break; \n"
|
||||
" default: \n"
|
||||
" bRes = bInfront; \n"
|
||||
" break; \n"
|
||||
" } \n"
|
||||
" bRes = bRes || (uEnableDepthCompare == 0); \n"
|
||||
" if (uEnableDepthUpdate != 0 && bRes) { \n"
|
||||
;
|
||||
if (_glinfo.imageTextures) {
|
||||
|
@ -2008,9 +2006,7 @@ public:
|
|||
}
|
||||
m_part +=
|
||||
" } \n"
|
||||
" if (uEnableDepthCompare != 0) \n"
|
||||
" return bRes; \n"
|
||||
" return true; \n"
|
||||
"} \n"
|
||||
;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace glsl {
|
|||
bool _saveCombinerKeys(const graphics::Combiners & _combiners) const;
|
||||
bool _loadFromCombinerKeys(graphics::Combiners & _combiners);
|
||||
|
||||
const u32 m_formatVersion = 0x22U;
|
||||
const u32 m_formatVersion = 0x23U;
|
||||
const u32 m_keysFormatVersion = 0x04;
|
||||
const opengl::GLInfo & m_glinfo;
|
||||
opengl::CachedUseProgram * m_useProgram;
|
||||
|
|
Loading…
Reference in New Issue
Block a user