mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-15 23:40:29 +02:00
The Tantalus games (Cars Race-O-Rama, MX vs ATV Reflex and Untamed, SpongeBob) turn depth into fog with a CLUT16 read of the swizzled depth mirror, stretched 2x into a 565 view of an 8888 buffer. A following 8888 copy writes the scene's RGB and keeps the alpha, so each pixel's fog factor is the upper 565 half. At a higher render scale, the depth X swizzle snapped every render pixel to its PSP pixel's left edge, so the fog came out in PSP-pixel blocks. It now keeps the position within the PSP pixel. That leaves the upper half sampling the right half of the depth texel, half a pixel off the scene, which drew magenta halos on the right of objects in Cars. With the new DepthCLUTIntoHalves compat flag, the depal pass outputs twice as wide so each render pixel reads its own 8888 pixel's depth. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>