render: fix loading-screen edge slivers - 2D half-pixel now matches emulated

This commit is contained in:
mchughalex 2026-07-17 03:56:48 +01:00
parent 34a11063f9
commit a8be4d92c4
3 changed files with 158 additions and 89 deletions

View file

@ -7,10 +7,8 @@ cbuffer C : register(b0) {
float4 m[10]; // m[0..3] proj rows, m[4..7] world rows, m[8] color,
// m[9].x = apply D3D9 half-pixel (2D ortho draws only),
// m[9].y = sharp-magnification amount (0 = plain bilinear),
// m[9].zw = the D3D9 half-pixel shift in NDC (7/16 of an
// OUTPUT pixel; exactly 1/2 puts edge-to-edge quads'
// last row/col centers ON the bottom/right edge and the
// top-left rule drops them: the 1px sliver)
// m[9].zw = unused (the D3D9 half-pixel shift is derived
// in the VS from the draw's own ortho scale)
};
Texture2D<float4> tex : register(t0);
SamplerState smp : register(s1);
@ -23,18 +21,45 @@ VSOut vs_main(float4 p : POSITION, float2 uv : TEXCOORD0, float4 color : COLOR0)
float4 wp = float4(dot(p, m[4]), dot(p, m[5]), dot(p, m[6]), dot(p, m[7]));
VSOut o;
o.pos = float4(dot(wp, m[0]), dot(wp, m[1]), dot(wp, m[2]), dot(wp, m[3]));
// D3D9 half-pixel convention: the art bakes half-texel UVs expecting
// pixel centers at integer coordinates; without this the clock-face
// quadrant tiles show their wrapped border rows as dark seam lines.
// The rasterization-convention delta is half a pixel OF THE RENDER
// TARGET: half a NATIVE pixel, not half a 720p pixel (0.5 * m[0].x =
// half a 720p pixel shifted fullscreen art 1-2 native px up-left at 2x+
// output scales: the see-through sliver along the bottom/right of
// loading screens). Must not apply to 3D (world-space SimpleDraw
// markers), where the projection is perspective.
// D3D9 half-pixel convention: the game targets integer pixel centers
// and bakes a -0.5px shift into its 2D geometry; host APIs put pixel
// centers at +0.5. The emulated path reverses this by adding +0.5 GUEST
// pixel down-right at the viewport transform (rexglue util/draw.cpp,
// half_pixel_offset cvar); replicate that exactly, deriving the guest
// pixel size from the draw's own ortho scale (|m[0].x| = 2/W, |m[1].y|
// = 2/H of the guest target; abs() pins the shift down-right on the
// render target like the emulated viewport offset). This both aligns
// pixel centers with texel centers for 1:1 art (without it the
// clock-face quadrant tiles show their wrapped border rows as dark seam
// lines) and restores full edge coverage (the previous up-left
// output-pixel nudge left a see-through sliver along the bottom/right
// of edge-to-edge loading-screen quads at 2x+ output scales). Must not
// apply to 3D (world-space SimpleDraw markers), where the projection is
// perspective.
if (m[9].x > 0.0) {
o.pos.x -= m[9].z * o.pos.w;
o.pos.y += m[9].w * o.pos.w;
o.pos.x += 0.5 * abs(m[0].x) * o.pos.w;
o.pos.y -= 0.5 * abs(m[1].y) * o.pos.w;
// Edge snap: edge-to-edge art routinely lands a hair short of the
// target boundary (sub-pixel authoring slop; the loading screen's
// background reaches ~1279.5 of 1280 after the shift above, and the
// shift itself moves the top/left edges half a pixel inward). At 1x
// that is an invisible dark fringe; at 2x+ native scale it is a crisp
// see-through sliver. Pull vertices within 3/4 of a guest pixel of a
// boundary outward to exactly the boundary; the emulated path ships
// the same remedy for its scaled resolves
// (resolve_resolution_scale_fill_half_pixel_offset stretches the
// first covered pixel over the gap). Distortion is sub-guest-pixel
// and only for geometry already touching the edge; shared strip
// vertices snap identically (pure function of position), so no
// cracks are introduced between adjacent tiles.
float2 gpx = float2(abs(m[0].x), abs(m[1].y)); // one guest px in NDC
float2 ndc = o.pos.xy / o.pos.w;
float2 eps = 0.75 * gpx;
if (ndc.x <= 1.0 && ndc.x > 1.0 - eps.x) ndc.x = 1.0;
if (ndc.x >= -1.0 && ndc.x < -1.0 + eps.x) ndc.x = -1.0;
if (ndc.y <= 1.0 && ndc.y > 1.0 - eps.y) ndc.y = 1.0;
if (ndc.y >= -1.0 && ndc.y < -1.0 + eps.y) ndc.y = -1.0;
o.pos.xy = ndc * o.pos.w;
}
o.uv = uv;
o.color = color;

View file

@ -2818,71 +2818,118 @@ static const uint32_t k_outline_ps_main[] = {
0x00000011, 0x0003003e, 0x00000004, 0x000000ff, 0x000100fd, 0x00010038,
};
// overlay2d.hlsl : vs_main (2008 bytes)
// overlay2d.hlsl : vs_main (3496 bytes)
static const uint32_t k_overlay2d_vs_main[] = {
0x07230203, 0x00010300, 0x000e0000, 0x00000053, 0x00000000, 0x00020011, 0x00000001, 0x0003000e,
0x00000000, 0x00000001, 0x000b000f, 0x00000000, 0x00000001, 0x6d5f7376, 0x006e6961, 0x00000002,
0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00030003, 0x00000005, 0x00000258,
0x00040005, 0x00000008, 0x65707974, 0x0000432e, 0x00040006, 0x00000008, 0x00000000, 0x0000006d,
0x00030005, 0x00000009, 0x00000043, 0x00060005, 0x00000002, 0x762e6e69, 0x502e7261, 0x5449534f,
0x004e4f49, 0x00070005, 0x00000003, 0x762e6e69, 0x542e7261, 0x4f435845, 0x3044524f, 0x00000000,
0x00060005, 0x00000004, 0x762e6e69, 0x432e7261, 0x524f4c4f, 0x00000030, 0x00070005, 0x00000006,
0x2e74756f, 0x2e726176, 0x43584554, 0x44524f4f, 0x00000030, 0x00060005, 0x00000007, 0x2e74756f,
0x2e726176, 0x4f4c4f43, 0x00003052, 0x00040005, 0x00000001, 0x6d5f7376, 0x006e6961, 0x00040047,
0x00000005, 0x0000000b, 0x00000000, 0x00040047, 0x00000002, 0x0000001e, 0x00000000, 0x00040047,
0x00000003, 0x0000001e, 0x00000001, 0x00040047, 0x00000004, 0x0000001e, 0x00000002, 0x00040047,
0x00000006, 0x0000001e, 0x00000000, 0x00040047, 0x00000007, 0x0000001e, 0x00000001, 0x00040047,
0x00000009, 0x00000022, 0x00000000, 0x00040047, 0x00000009, 0x00000021, 0x00000000, 0x00040047,
0x0000000a, 0x00000006, 0x00000010, 0x00050048, 0x00000008, 0x00000000, 0x00000023, 0x00000000,
0x00030047, 0x00000008, 0x00000002, 0x00040015, 0x0000000b, 0x00000020, 0x00000001, 0x0004002b,
0x0000000b, 0x0000000c, 0x00000000, 0x0004002b, 0x0000000b, 0x0000000d, 0x00000004, 0x0004002b,
0x0000000b, 0x0000000e, 0x00000005, 0x0004002b, 0x0000000b, 0x0000000f, 0x00000006, 0x0004002b,
0x0000000b, 0x00000010, 0x00000007, 0x0004002b, 0x0000000b, 0x00000011, 0x00000001, 0x0004002b,
0x0000000b, 0x00000012, 0x00000002, 0x0004002b, 0x0000000b, 0x00000013, 0x00000003, 0x0004002b,
0x0000000b, 0x00000014, 0x00000009, 0x00030016, 0x00000015, 0x00000020, 0x0004002b, 0x00000015,
0x00000016, 0x00000000, 0x00040015, 0x00000017, 0x00000020, 0x00000000, 0x0004002b, 0x00000017,
0x00000018, 0x0000000a, 0x00040017, 0x00000019, 0x00000015, 0x00000004, 0x0004001c, 0x0000000a,
0x00000019, 0x00000018, 0x0003001e, 0x00000008, 0x0000000a, 0x00040020, 0x0000001a, 0x00000002,
0x00000008, 0x00040020, 0x0000001b, 0x00000001, 0x00000019, 0x00040017, 0x0000001c, 0x00000015,
0x00000002, 0x00040020, 0x0000001d, 0x00000001, 0x0000001c, 0x00040020, 0x0000001e, 0x00000003,
0x00000019, 0x00040020, 0x0000001f, 0x00000003, 0x0000001c, 0x00020013, 0x00000020, 0x00030021,
0x00000021, 0x00000020, 0x00040020, 0x00000022, 0x00000002, 0x00000019, 0x00040020, 0x00000023,
0x00000002, 0x00000015, 0x00020014, 0x00000024, 0x0004003b, 0x0000001a, 0x00000009, 0x00000002,
0x0004003b, 0x0000001b, 0x00000002, 0x00000001, 0x0004003b, 0x0000001d, 0x00000003, 0x00000001,
0x0004003b, 0x0000001b, 0x00000004, 0x00000001, 0x0004003b, 0x0000001e, 0x00000005, 0x00000003,
0x0004003b, 0x0000001f, 0x00000006, 0x00000003, 0x0004003b, 0x0000001e, 0x00000007, 0x00000003,
0x00050036, 0x00000020, 0x00000001, 0x00000000, 0x00000021, 0x000200f8, 0x00000025, 0x0004003d,
0x00000019, 0x00000026, 0x00000002, 0x0004003d, 0x0000001c, 0x00000027, 0x00000003, 0x0004003d,
0x00000019, 0x00000028, 0x00000004, 0x00060041, 0x00000022, 0x00000029, 0x00000009, 0x0000000c,
0x0000000d, 0x0004003d, 0x00000019, 0x0000002a, 0x00000029, 0x00050094, 0x00000015, 0x0000002b,
0x00000026, 0x0000002a, 0x00060041, 0x00000022, 0x0000002c, 0x00000009, 0x0000000c, 0x0000000e,
0x0004003d, 0x00000019, 0x0000002d, 0x0000002c, 0x00050094, 0x00000015, 0x0000002e, 0x00000026,
0x0000002d, 0x00060041, 0x00000022, 0x0000002f, 0x00000009, 0x0000000c, 0x0000000f, 0x0004003d,
0x00000019, 0x00000030, 0x0000002f, 0x00050094, 0x00000015, 0x00000031, 0x00000026, 0x00000030,
0x00060041, 0x00000022, 0x00000032, 0x00000009, 0x0000000c, 0x00000010, 0x0004003d, 0x00000019,
0x00000033, 0x00000032, 0x00050094, 0x00000015, 0x00000034, 0x00000026, 0x00000033, 0x00070050,
0x00000019, 0x00000035, 0x0000002b, 0x0000002e, 0x00000031, 0x00000034, 0x00060041, 0x00000022,
0x00000036, 0x00000009, 0x0000000c, 0x0000000c, 0x0004003d, 0x00000019, 0x00000037, 0x00000036,
0x00050094, 0x00000015, 0x00000038, 0x00000035, 0x00000037, 0x00060041, 0x00000022, 0x00000039,
0x00000009, 0x0000000c, 0x00000011, 0x0004003d, 0x00000019, 0x0000003a, 0x00000039, 0x00050094,
0x00000015, 0x0000003b, 0x00000035, 0x0000003a, 0x00060041, 0x00000022, 0x0000003c, 0x00000009,
0x0000000c, 0x00000012, 0x0004003d, 0x00000019, 0x0000003d, 0x0000003c, 0x00050094, 0x00000015,
0x0000003e, 0x00000035, 0x0000003d, 0x00060041, 0x00000022, 0x0000003f, 0x00000009, 0x0000000c,
0x00000013, 0x0004003d, 0x00000019, 0x00000040, 0x0000003f, 0x00050094, 0x00000015, 0x00000041,
0x00000035, 0x00000040, 0x00070050, 0x00000019, 0x00000042, 0x00000038, 0x0000003b, 0x0000003e,
0x00000041, 0x00070041, 0x00000023, 0x00000043, 0x00000009, 0x0000000c, 0x00000014, 0x0000000c,
0x0004003d, 0x00000015, 0x00000044, 0x00000043, 0x000500ba, 0x00000024, 0x00000045, 0x00000044,
0x00000016, 0x000300f7, 0x00000046, 0x00000000, 0x000400fa, 0x00000045, 0x00000047, 0x00000046,
0x000200f8, 0x00000047, 0x00070041, 0x00000023, 0x00000048, 0x00000009, 0x0000000c, 0x00000014,
0x00000012, 0x0004003d, 0x00000015, 0x00000049, 0x00000048, 0x00050085, 0x00000015, 0x0000004a,
0x00000049, 0x00000041, 0x00050083, 0x00000015, 0x0000004b, 0x00000038, 0x0000004a, 0x00060052,
0x00000019, 0x0000004c, 0x0000004b, 0x00000042, 0x00000000, 0x00070041, 0x00000023, 0x0000004d,
0x00000009, 0x0000000c, 0x00000014, 0x00000013, 0x0004003d, 0x00000015, 0x0000004e, 0x0000004d,
0x00050085, 0x00000015, 0x0000004f, 0x0000004e, 0x00000041, 0x00050081, 0x00000015, 0x00000050,
0x0000003b, 0x0000004f, 0x00060052, 0x00000019, 0x00000051, 0x00000050, 0x0000004c, 0x00000001,
0x000200f9, 0x00000046, 0x000200f8, 0x00000046, 0x000700f5, 0x00000019, 0x00000052, 0x00000042,
0x00000025, 0x00000051, 0x00000047, 0x0003003e, 0x00000005, 0x00000052, 0x0003003e, 0x00000006,
0x00000027, 0x0003003e, 0x00000007, 0x00000028, 0x000100fd, 0x00010038,
0x07230203, 0x00010300, 0x000e0000, 0x00000094, 0x00000000, 0x00020011, 0x00000001, 0x0006000b,
0x00000001, 0x4c534c47, 0x6474732e, 0x3035342e, 0x00000000, 0x0003000e, 0x00000000, 0x00000001,
0x000b000f, 0x00000000, 0x00000002, 0x6d5f7376, 0x006e6961, 0x00000003, 0x00000004, 0x00000005,
0x00000006, 0x00000007, 0x00000008, 0x00030003, 0x00000005, 0x00000258, 0x00040005, 0x00000009,
0x65707974, 0x0000432e, 0x00040006, 0x00000009, 0x00000000, 0x0000006d, 0x00030005, 0x0000000a,
0x00000043, 0x00060005, 0x00000003, 0x762e6e69, 0x502e7261, 0x5449534f, 0x004e4f49, 0x00070005,
0x00000004, 0x762e6e69, 0x542e7261, 0x4f435845, 0x3044524f, 0x00000000, 0x00060005, 0x00000005,
0x762e6e69, 0x432e7261, 0x524f4c4f, 0x00000030, 0x00070005, 0x00000007, 0x2e74756f, 0x2e726176,
0x43584554, 0x44524f4f, 0x00000030, 0x00060005, 0x00000008, 0x2e74756f, 0x2e726176, 0x4f4c4f43,
0x00003052, 0x00040005, 0x00000002, 0x6d5f7376, 0x006e6961, 0x00040047, 0x00000006, 0x0000000b,
0x00000000, 0x00040047, 0x00000003, 0x0000001e, 0x00000000, 0x00040047, 0x00000004, 0x0000001e,
0x00000001, 0x00040047, 0x00000005, 0x0000001e, 0x00000002, 0x00040047, 0x00000007, 0x0000001e,
0x00000000, 0x00040047, 0x00000008, 0x0000001e, 0x00000001, 0x00040047, 0x0000000a, 0x00000022,
0x00000000, 0x00040047, 0x0000000a, 0x00000021, 0x00000000, 0x00040047, 0x0000000b, 0x00000006,
0x00000010, 0x00050048, 0x00000009, 0x00000000, 0x00000023, 0x00000000, 0x00030047, 0x00000009,
0x00000002, 0x00040015, 0x0000000c, 0x00000020, 0x00000001, 0x0004002b, 0x0000000c, 0x0000000d,
0x00000000, 0x0004002b, 0x0000000c, 0x0000000e, 0x00000004, 0x0004002b, 0x0000000c, 0x0000000f,
0x00000005, 0x0004002b, 0x0000000c, 0x00000010, 0x00000006, 0x0004002b, 0x0000000c, 0x00000011,
0x00000007, 0x0004002b, 0x0000000c, 0x00000012, 0x00000001, 0x0004002b, 0x0000000c, 0x00000013,
0x00000002, 0x0004002b, 0x0000000c, 0x00000014, 0x00000003, 0x0004002b, 0x0000000c, 0x00000015,
0x00000009, 0x00030016, 0x00000016, 0x00000020, 0x0004002b, 0x00000016, 0x00000017, 0x00000000,
0x0004002b, 0x00000016, 0x00000018, 0x3f000000, 0x00040015, 0x00000019, 0x00000020, 0x00000000,
0x0004002b, 0x00000016, 0x0000001a, 0x3f400000, 0x0004002b, 0x00000016, 0x0000001b, 0x3f800000,
0x00020014, 0x0000001c, 0x0003002a, 0x0000001c, 0x0000001d, 0x0004002b, 0x00000016, 0x0000001e,
0xbf800000, 0x0004002b, 0x00000019, 0x0000001f, 0x0000000a, 0x00040017, 0x00000020, 0x00000016,
0x00000004, 0x0004001c, 0x0000000b, 0x00000020, 0x0000001f, 0x0003001e, 0x00000009, 0x0000000b,
0x00040020, 0x00000021, 0x00000002, 0x00000009, 0x00040020, 0x00000022, 0x00000001, 0x00000020,
0x00040017, 0x00000023, 0x00000016, 0x00000002, 0x00040020, 0x00000024, 0x00000001, 0x00000023,
0x00040020, 0x00000025, 0x00000003, 0x00000020, 0x00040020, 0x00000026, 0x00000003, 0x00000023,
0x00020013, 0x00000027, 0x00030021, 0x00000028, 0x00000027, 0x00040020, 0x00000029, 0x00000002,
0x00000020, 0x00040020, 0x0000002a, 0x00000002, 0x00000016, 0x0004003b, 0x00000021, 0x0000000a,
0x00000002, 0x0004003b, 0x00000022, 0x00000003, 0x00000001, 0x0004003b, 0x00000024, 0x00000004,
0x00000001, 0x0004003b, 0x00000022, 0x00000005, 0x00000001, 0x0004003b, 0x00000025, 0x00000006,
0x00000003, 0x0004003b, 0x00000026, 0x00000007, 0x00000003, 0x0004003b, 0x00000025, 0x00000008,
0x00000003, 0x00050036, 0x00000027, 0x00000002, 0x00000000, 0x00000028, 0x000200f8, 0x0000002b,
0x0004003d, 0x00000020, 0x0000002c, 0x00000003, 0x0004003d, 0x00000023, 0x0000002d, 0x00000004,
0x0004003d, 0x00000020, 0x0000002e, 0x00000005, 0x00060041, 0x00000029, 0x0000002f, 0x0000000a,
0x0000000d, 0x0000000e, 0x0004003d, 0x00000020, 0x00000030, 0x0000002f, 0x00050094, 0x00000016,
0x00000031, 0x0000002c, 0x00000030, 0x00060041, 0x00000029, 0x00000032, 0x0000000a, 0x0000000d,
0x0000000f, 0x0004003d, 0x00000020, 0x00000033, 0x00000032, 0x00050094, 0x00000016, 0x00000034,
0x0000002c, 0x00000033, 0x00060041, 0x00000029, 0x00000035, 0x0000000a, 0x0000000d, 0x00000010,
0x0004003d, 0x00000020, 0x00000036, 0x00000035, 0x00050094, 0x00000016, 0x00000037, 0x0000002c,
0x00000036, 0x00060041, 0x00000029, 0x00000038, 0x0000000a, 0x0000000d, 0x00000011, 0x0004003d,
0x00000020, 0x00000039, 0x00000038, 0x00050094, 0x00000016, 0x0000003a, 0x0000002c, 0x00000039,
0x00070050, 0x00000020, 0x0000003b, 0x00000031, 0x00000034, 0x00000037, 0x0000003a, 0x00060041,
0x00000029, 0x0000003c, 0x0000000a, 0x0000000d, 0x0000000d, 0x0004003d, 0x00000020, 0x0000003d,
0x0000003c, 0x00050094, 0x00000016, 0x0000003e, 0x0000003b, 0x0000003d, 0x00060041, 0x00000029,
0x0000003f, 0x0000000a, 0x0000000d, 0x00000012, 0x0004003d, 0x00000020, 0x00000040, 0x0000003f,
0x00050094, 0x00000016, 0x00000041, 0x0000003b, 0x00000040, 0x00060041, 0x00000029, 0x00000042,
0x0000000a, 0x0000000d, 0x00000013, 0x0004003d, 0x00000020, 0x00000043, 0x00000042, 0x00050094,
0x00000016, 0x00000044, 0x0000003b, 0x00000043, 0x00060041, 0x00000029, 0x00000045, 0x0000000a,
0x0000000d, 0x00000014, 0x0004003d, 0x00000020, 0x00000046, 0x00000045, 0x00050094, 0x00000016,
0x00000047, 0x0000003b, 0x00000046, 0x00070050, 0x00000020, 0x00000048, 0x0000003e, 0x00000041,
0x00000044, 0x00000047, 0x00070041, 0x0000002a, 0x00000049, 0x0000000a, 0x0000000d, 0x00000015,
0x0000000d, 0x0004003d, 0x00000016, 0x0000004a, 0x00000049, 0x000500ba, 0x0000001c, 0x0000004b,
0x0000004a, 0x00000017, 0x000300f7, 0x0000004c, 0x00000000, 0x000400fa, 0x0000004b, 0x0000004d,
0x0000004c, 0x000200f8, 0x0000004d, 0x00070041, 0x0000002a, 0x0000004e, 0x0000000a, 0x0000000d,
0x0000000d, 0x0000000d, 0x0004003d, 0x00000016, 0x0000004f, 0x0000004e, 0x0006000c, 0x00000016,
0x00000050, 0x00000001, 0x00000004, 0x0000004f, 0x00050085, 0x00000016, 0x00000051, 0x00000018,
0x00000050, 0x00050085, 0x00000016, 0x00000052, 0x00000051, 0x00000047, 0x00050081, 0x00000016,
0x00000053, 0x0000003e, 0x00000052, 0x00060052, 0x00000020, 0x00000054, 0x00000053, 0x00000048,
0x00000000, 0x00070041, 0x0000002a, 0x00000055, 0x0000000a, 0x0000000d, 0x00000012, 0x00000012,
0x0004003d, 0x00000016, 0x00000056, 0x00000055, 0x0006000c, 0x00000016, 0x00000057, 0x00000001,
0x00000004, 0x00000056, 0x00050085, 0x00000016, 0x00000058, 0x00000018, 0x00000057, 0x00050085,
0x00000016, 0x00000059, 0x00000058, 0x00000047, 0x00050083, 0x00000016, 0x0000005a, 0x00000041,
0x00000059, 0x00060052, 0x00000020, 0x0000005b, 0x0000005a, 0x00000054, 0x00000001, 0x00050050,
0x00000023, 0x0000005c, 0x00000050, 0x00000057, 0x0007004f, 0x00000023, 0x0000005d, 0x0000005b,
0x0000005b, 0x00000000, 0x00000001, 0x00050050, 0x00000023, 0x0000005e, 0x00000047, 0x00000047,
0x00050088, 0x00000023, 0x0000005f, 0x0000005d, 0x0000005e, 0x0005008e, 0x00000023, 0x00000060,
0x0000005c, 0x0000001a, 0x00050051, 0x00000016, 0x00000061, 0x0000005f, 0x00000000, 0x000500bc,
0x0000001c, 0x00000062, 0x00000061, 0x0000001b, 0x000300f7, 0x00000063, 0x00000000, 0x000400fa,
0x00000062, 0x00000064, 0x00000063, 0x000200f8, 0x00000064, 0x00050051, 0x00000016, 0x00000065,
0x00000060, 0x00000000, 0x00050083, 0x00000016, 0x00000066, 0x0000001b, 0x00000065, 0x000500ba,
0x0000001c, 0x00000067, 0x00000061, 0x00000066, 0x000200f9, 0x00000063, 0x000200f8, 0x00000063,
0x000700f5, 0x0000001c, 0x00000068, 0x0000001d, 0x0000004d, 0x00000067, 0x00000064, 0x000300f7,
0x00000069, 0x00000000, 0x000400fa, 0x00000068, 0x0000006a, 0x00000069, 0x000200f8, 0x0000006a,
0x00060052, 0x00000023, 0x0000006b, 0x0000001b, 0x0000005f, 0x00000000, 0x000200f9, 0x00000069,
0x000200f8, 0x00000069, 0x000700f5, 0x00000023, 0x0000006c, 0x0000005f, 0x00000063, 0x0000006b,
0x0000006a, 0x00050051, 0x00000016, 0x0000006d, 0x0000006c, 0x00000000, 0x000500be, 0x0000001c,
0x0000006e, 0x0000006d, 0x0000001e, 0x000300f7, 0x0000006f, 0x00000000, 0x000400fa, 0x0000006e,
0x00000070, 0x0000006f, 0x000200f8, 0x00000070, 0x00050051, 0x00000016, 0x00000071, 0x00000060,
0x00000000, 0x00050081, 0x00000016, 0x00000072, 0x0000001e, 0x00000071, 0x000500b8, 0x0000001c,
0x00000073, 0x0000006d, 0x00000072, 0x000200f9, 0x0000006f, 0x000200f8, 0x0000006f, 0x000700f5,
0x0000001c, 0x00000074, 0x0000001d, 0x00000069, 0x00000073, 0x00000070, 0x000300f7, 0x00000075,
0x00000000, 0x000400fa, 0x00000074, 0x00000076, 0x00000075, 0x000200f8, 0x00000076, 0x00060052,
0x00000023, 0x00000077, 0x0000001e, 0x0000006c, 0x00000000, 0x000200f9, 0x00000075, 0x000200f8,
0x00000075, 0x000700f5, 0x00000023, 0x00000078, 0x0000006c, 0x0000006f, 0x00000077, 0x00000076,
0x00050051, 0x00000016, 0x00000079, 0x00000078, 0x00000001, 0x000500bc, 0x0000001c, 0x0000007a,
0x00000079, 0x0000001b, 0x000300f7, 0x0000007b, 0x00000000, 0x000400fa, 0x0000007a, 0x0000007c,
0x0000007b, 0x000200f8, 0x0000007c, 0x00050051, 0x00000016, 0x0000007d, 0x00000060, 0x00000001,
0x00050083, 0x00000016, 0x0000007e, 0x0000001b, 0x0000007d, 0x000500ba, 0x0000001c, 0x0000007f,
0x00000079, 0x0000007e, 0x000200f9, 0x0000007b, 0x000200f8, 0x0000007b, 0x000700f5, 0x0000001c,
0x00000080, 0x0000001d, 0x00000075, 0x0000007f, 0x0000007c, 0x000300f7, 0x00000081, 0x00000000,
0x000400fa, 0x00000080, 0x00000082, 0x00000081, 0x000200f8, 0x00000082, 0x00060052, 0x00000023,
0x00000083, 0x0000001b, 0x00000078, 0x00000001, 0x000200f9, 0x00000081, 0x000200f8, 0x00000081,
0x000700f5, 0x00000023, 0x00000084, 0x00000078, 0x0000007b, 0x00000083, 0x00000082, 0x00050051,
0x00000016, 0x00000085, 0x00000084, 0x00000001, 0x000500be, 0x0000001c, 0x00000086, 0x00000085,
0x0000001e, 0x000300f7, 0x00000087, 0x00000000, 0x000400fa, 0x00000086, 0x00000088, 0x00000087,
0x000200f8, 0x00000088, 0x00050051, 0x00000016, 0x00000089, 0x00000060, 0x00000001, 0x00050081,
0x00000016, 0x0000008a, 0x0000001e, 0x00000089, 0x000500b8, 0x0000001c, 0x0000008b, 0x00000085,
0x0000008a, 0x000200f9, 0x00000087, 0x000200f8, 0x00000087, 0x000700f5, 0x0000001c, 0x0000008c,
0x0000001d, 0x00000081, 0x0000008b, 0x00000088, 0x000300f7, 0x0000008d, 0x00000000, 0x000400fa,
0x0000008c, 0x0000008e, 0x0000008d, 0x000200f8, 0x0000008e, 0x00060052, 0x00000023, 0x0000008f,
0x0000001e, 0x00000084, 0x00000001, 0x000200f9, 0x0000008d, 0x000200f8, 0x0000008d, 0x000700f5,
0x00000023, 0x00000090, 0x00000084, 0x00000087, 0x0000008f, 0x0000008e, 0x0005008e, 0x00000023,
0x00000091, 0x00000090, 0x00000047, 0x0009004f, 0x00000020, 0x00000092, 0x0000005b, 0x00000091,
0x00000004, 0x00000005, 0x00000002, 0x00000003, 0x000200f9, 0x0000004c, 0x000200f8, 0x0000004c,
0x000700f5, 0x00000020, 0x00000093, 0x00000048, 0x0000002b, 0x00000092, 0x0000008d, 0x0003003e,
0x00000006, 0x00000093, 0x0003003e, 0x00000007, 0x0000002d, 0x0003003e, 0x00000008, 0x0000002e,
0x000100fd, 0x00010038,
};
// overlay2d.hlsl : ps_main (5168 bytes)

View file

@ -18791,16 +18791,13 @@ bool RenderScene(const NativeGuestOutputRenderContext& context, void* /*user_dat
// (see the cvar; the shader gates on actual fetch magnification).
constants[37] = float(std::clamp(
REXCVAR_GET(skate3_native_render_scene_2d_sharp), 0.0, 2.0));
// m[9].zw: the D3D9 half-pixel shift in NDC, in OUTPUT-pixel units
// (half a 720p pixel shifted fullscreen art 1-2 native px up-left
// at 2x+ scales), and deliberately 7/16 px instead of exactly
// 1/2: an exact half puts the bottom/right edge of an
// edge-to-edge quad precisely THROUGH the last row/column's pixel
// centers, and the top-left fill rule then drops that row/column
// - the residual 1px see-through sliver on loading screens. The
// 1/16 px underhang is far below visible sampling misalignment.
constants[38] = viewport.width > 0.0f ? 0.875f / viewport.width : 0.0f;
constants[39] = viewport.height > 0.0f ? 0.875f / viewport.height : 0.0f;
// m[9].zw: unused. The D3D9 half-pixel shift is derived in the VS
// from the draw's own ortho scale (+0.5 GUEST pixel down-right,
// matching the emulated path's half_pixel_offset reversal); the
// old up-left OUTPUT-pixel nudge staged here left a see-through
// sliver along the bottom/right of edge-to-edge loading quads.
constants[38] = 0.0f;
constants[39] = 0.0f;
cmd->SetRootConstants(0, 40, constants, 0);
cmd->SetTexture(1, srv_view);
if (yuv != nullptr) {