mirror of
https://github.com/libretro/parallel-ps2.git
synced 2026-11-07 17:30:11 -10:00
A sky's clouds, read through a palette the game rebuilds in a target every frame, came out as a hatched blotch at 4x and were right at native. Three things at scale, each pinned by a case: A target preloaded from local memory was upscaled with a linear filter (the bilinear upload hack, on by default and through the GameDB for a hundred titles), so a palette entry's block of fragments held a gradient of its neighbours. A pixel of local memory is now a block of the scale's fragments, as the GS has it; the hack, its config and its GameDB fix go. A palette copied from a target is one value an entry: its native pixel's, read at the place among the pixel's fragments where the draw at scale put the native sample (NativeSample: the first fragment's centre on the kept grid, the pixel's middle under the Normal and Native offsets, between two fragments at an even scale, with a linear fetch). The copy that kept every fragment as a sample of its own, and let each fragment of a draw read its own, gave every fragment a different entry; the readback at scale took the block's middle for every draw, half a pixel off on the kept grid, and takes the same place now. A point is drawn at the pixel its vertex is in, whatever the vertex's fraction: its centre for a sized point, which spans half the size either way, its origin for one expanded into a quad; a sized point at scale was centred on the pixel's corner and covered a quarter of it. tests/swdraw: palette_bilinear, palette_bilinear_drawn and palette_shaded, native and at 4x on both renderers in tests/vknegotiate, which runs palette_engulfed at 4x too; tests/gsclut/clut_from_target checks the entry's sample.