1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-07 03:13:49 +00:00

Add special texrect function for Conker BFD shadow.

Problem:
shadow is rendered into an auxilary buffer. At the end of rendering the buffer is
renders to itself as texture, using texrect command. FBO work in undefined
when it's color attachment is used as input and output. As result the
shadow is incorrect.

Thus, it's better to skip that texrect. Hack!
This commit is contained in:
Sergey Lipskiy 2015-03-13 22:28:49 +06:00
parent fce5639a85
commit c6083851fc

View File

@ -956,6 +956,14 @@ bool texturedRectDepthBufferCopy(const OGLRender::TexturedRectParams & _params)
return false;
}
static
bool texturedRectCopyToItself(const OGLRender::TexturedRectParams & _params)
{
if (gSP.textureTile[0]->frameBuffer == frameBufferList().getCurrent())
return true;
return texturedRectDepthBufferCopy(_params);
}
static
bool texturedRectBGCopy(const OGLRender::TexturedRectParams & _params)
{
@ -1334,8 +1342,10 @@ void OGLRender::_setSpecialTexrect() const
if (strstr(name, (const char *)"Beetle") || strstr(name, (const char *)"BEETLE") || strstr(name, (const char *)"HSV")
|| strstr(name, (const char *)"DUCK DODGERS") || strstr(name, (const char *)"DAFFY DUCK"))
texturedRectSpecial = texturedRectShadowMap;
else if (strstr(name, (const char *)"CONKER BFD") || strstr(name, (const char *)"Perfect Dark") || strstr(name, (const char *)"PERFECT DARK"))
else if (strstr(name, (const char *)"Perfect Dark") || strstr(name, (const char *)"PERFECT DARK"))
texturedRectSpecial = texturedRectDepthBufferCopy; // See comments to that function!
else if (strstr(name, (const char *)"CONKER BFD"))
texturedRectSpecial = texturedRectCopyToItself;
else if (strstr(name, (const char *)"YOSHI STORY"))
texturedRectSpecial = texturedRectBGCopy;
else if (strstr(name, (const char *)"PAPER MARIO") || strstr(name, (const char *)"MARIO STORY"))