mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Hardcode blend mode, which is impossible to emulate with shaders.
Fixed Tony Hawk's Pro Skater 2 Shadow Glitch #1337
This commit is contained in:
parent
732c27a07d
commit
3c61198043
|
@ -306,6 +306,12 @@ public:
|
||||||
|
|
||||||
void update(bool _force) override
|
void update(bool _force) override
|
||||||
{
|
{
|
||||||
|
if ((gDP.otherMode.l & 0xFFFF0000) == 0x01500000) {
|
||||||
|
uForceBlendCycle1.set(0, _force);
|
||||||
|
uForceBlendCycle2.set(0, _force);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
uBlendMux1.set(gDP.otherMode.c1_m1a,
|
uBlendMux1.set(gDP.otherMode.c1_m1a,
|
||||||
gDP.otherMode.c1_m1b,
|
gDP.otherMode.c1_m1b,
|
||||||
gDP.otherMode.c1_m2a,
|
gDP.otherMode.c1_m2a,
|
||||||
|
|
|
@ -441,6 +441,17 @@ void GraphicsDrawer::_setBlendMode() const
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((gDP.otherMode.l & 0xFFFF0000) == 0x01500000) {
|
||||||
|
// clr_in * a_in + clr_mem * (1-a)
|
||||||
|
// clr_in * a_fog + clr_mem * (1-a)
|
||||||
|
// impossible to emulate
|
||||||
|
if (gDP.otherMode.forceBlender != 0 && gDP.otherMode.cycleType < G_CYC_COPY) {
|
||||||
|
gfxContext.enable(enable::BLEND, true);
|
||||||
|
gfxContext.setBlending(blend::SRC_ALPHA, blend::ONE_MINUS_SRC_ALPHA);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (gDP.otherMode.forceBlender != 0 && gDP.otherMode.cycleType < G_CYC_COPY) {
|
if (gDP.otherMode.forceBlender != 0 && gDP.otherMode.cycleType < G_CYC_COPY) {
|
||||||
BlendParam srcFactor = blend::ONE;
|
BlendParam srcFactor = blend::ONE;
|
||||||
BlendParam dstFactor = blend::ZERO;
|
BlendParam dstFactor = blend::ZERO;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user