mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-21 13:20:57 -06:00
check lower pixel when top pixel ignores fog (#1808)
This commit is contained in:
@ -1423,8 +1423,8 @@ void SoftRenderer::ScanlineFinalPass(s32 y)
|
||||
u32 density, srccolor, srcR, srcG, srcB, srcA;
|
||||
|
||||
u32 attr = AttrBuffer[pixeladdr];
|
||||
if (!(attr & (1<<15))) continue;
|
||||
|
||||
if (attr & (1<<15))
|
||||
{
|
||||
density = CalculateFogDensity(pixeladdr);
|
||||
|
||||
srccolor = ColorBuffer[pixeladdr];
|
||||
@ -1443,6 +1443,7 @@ void SoftRenderer::ScanlineFinalPass(s32 y)
|
||||
srcA = ((fogA * density) + (srcA * (128-density))) >> 7;
|
||||
|
||||
ColorBuffer[pixeladdr] = srcR | (srcG << 8) | (srcB << 16) | (srcA << 24);
|
||||
}
|
||||
|
||||
// fog for lower pixel
|
||||
// TODO: make this code nicer, but avoid using a loop
|
||||
|
Reference in New Issue
Block a user