mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Correct condition for valid depth buffer attachement.
Rat attack uses color buffer with width 640, but depth buffer width is only 639. goodDepthBufferTexture check failed because of it, and game run without depth compare. Fixed Rat attack missing geometry #600
This commit is contained in:
parent
da5acef3eb
commit
6de128b8fd
|
@ -910,9 +910,11 @@ void FrameBufferList::attachDepthBuffer()
|
|||
|
||||
bool goodDepthBufferTexture = false;
|
||||
if (Context::DepthFramebufferTextures) {
|
||||
goodDepthBufferTexture = Context::WeakBlitFramebuffer ?
|
||||
pDepthBuffer->m_pDepthBufferTexture->realWidth == pCurrent->m_pTexture->realWidth :
|
||||
pDepthBuffer->m_pDepthBufferTexture->realWidth >= pCurrent->m_pTexture->realWidth;
|
||||
if (Context::WeakBlitFramebuffer)
|
||||
goodDepthBufferTexture = pDepthBuffer->m_pDepthBufferTexture->realWidth == pCurrent->m_pTexture->realWidth;
|
||||
else
|
||||
goodDepthBufferTexture = pDepthBuffer->m_pDepthBufferTexture->realWidth >= pCurrent->m_pTexture->realWidth ||
|
||||
std::abs((s32)(pCurrent->m_width - pDepthBuffer->m_width)) < 2;
|
||||
} else {
|
||||
goodDepthBufferTexture = pDepthBuffer->m_depthRenderbufferWidth == pCurrent->m_pTexture->realWidth;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user