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

Add special blend mode for Conker BFD dynamic shadows

This commit is contained in:
Sergey Lipskiy 2015-03-13 22:07:12 +06:00
parent 4fd545225b
commit fce5639a85
3 changed files with 16 additions and 0 deletions

View File

@ -801,6 +801,14 @@ void ShaderCombiner::updateColors(bool _bForce)
_setV4Uniform(m_uniforms.uBlendColor, &gDP.blendColor.r, _bForce);
}
break;
case 0x07C2:
// Conker BFD shadow
// CLR_IN * A_FOG + CLR_FOG * 1MA
if (gDP.otherMode.cycleType == G_CYC_2CYCLE) {
nSpecialBlendMode = 3;
nFogUsage = 5;
}
break;
/* Brings troubles with Roadsters sky
case 0xc702:
// Donald Duck

View File

@ -497,6 +497,10 @@ void OGLRender::_setBlendMode() const
// Battlezone
// clr_in * a + clr_in * (1-a)
case 0xC800:
// Conker BFD
// clr_in * a_fog + clr_fog * (1-a)
// clr_in * 0 + clr_in * 1
case 0x07C2:
case 0x00C0:
//ISS64
case 0xC302:

View File

@ -357,6 +357,10 @@ static const char* fragment_shader_blender =
// Bomberman2
" color1 = uBlendColor.rgb * uFogColor.a + color1 * (1.0 - uFogColor.a); \n"
" break; \n"
" case 3: \n"
// Conker BFD
" color1 = color1 * uFogColor.a + uFogColor.rgb * (1.0 - uFogColor.a); \n"
" break; \n"
" } \n"
;
#endif