aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


commit e7dc5cf1f61ee9841bf6febfd45a6daa2ee452ac
parent 0b4a62b1333aaf16fe99cc11a9bfef580ec8072e
Author: anon <anon@example.com>
Date:   Fri, 23 Oct 2026 21:33:28 +0000

test(client): avoid GPU rounding boundary in modulation fixture

Diffstat:
Mclient/tests/devices.c | 5+++--
Mdocs/nano-damage.md | 11-----------
2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/client/tests/devices.c b/client/tests/devices.c @@ -1386,8 +1386,9 @@ static void depth_bias_offsets_overlapping_geometry(uint32_t device, uint32_t ta static void fourfold_modulation_clamps_before_the_next_stage(uint32_t device, uint32_t target) { uint32_t desc = workspace() + 128, input = workspace() + 512; + // Keep nonsaturated channels away from eight-bit rounding boundaries. struct vertex { float x, y, z, rhw; uint32_t color; } vertices[] = { - {0,0,.25f,1,0xc0c04020}, {32,0,.25f,1,0xc0c04020}, {0,32,.25f,1,0xc0c04020} + {0,0,.25f,1,0xc0c02020}, {32,0,.25f,1,0xc0c02020}, {0,32,.25f,1,0xc0c02020} }; memcpy(memory(input), vertices, sizeof(vertices)); assert(!invoke(device, 20, 3, 137u, 0u)); @@ -1417,7 +1418,7 @@ static void fourfold_modulation_clamps_before_the_next_stage(uint32_t device, ui *memory(desc) = 124; assert(!invoke(target, 25, 5, 0u, desc, 0x11u, 0u)); uint32_t pixels = *memory(desc + 36), pitch = *memory(desc + 16); - assert((*memory(pixels + 8 * pitch + 8 * 4) & 0xffffff) == 0x804120); + assert((*memory(pixels + 8 * pitch + 8 * 4) & 0xffffff) == 0x802020); assert(!invoke(target, 32, 2, 0u)); for (unsigned i = 0; i < 3; ++i) vertices[i].color = 0xc0c08020; diff --git a/docs/nano-damage.md b/docs/nano-damage.md @@ -112,17 +112,6 @@ above. Exact evidence, original bytes, arithmetic experiments and bounded unknowns are retained in `local/nano-damage-research/`, `local/nano-casting-research/` and `local/fpu-precision-research/`. -## Client adapter - -Winter's Bite's effect requests Direct3D COLOROP and ALPHAOP 6, MODULATE4X. -The adapter and shared OpenGL/WebGL shader multiply the selected color or -alpha arguments by four and clamp the stage result before the next stage. Color and alpha -retain independently selected operations. This follows Microsoft's -[D3DTEXTUREOP contract](https://learn.microsoft.com/en-us/windows/win32/direct3d9/d3dtextureop). -The previous adapter exited on this request, stopping both caster and observer. -A device-level pixel regression uses two stages to detect missing modulation -or a missing intermediate clamp. - ## Verification `TestWinterBite*` covers learning and persistence, requirement boundaries,