sprite sheet maker
Check a partial sprite atlas update with four surrounding sentinels
A thumbnail that appears to update successfully can leave remnants of its predecessor or erase an unrelated cell. For ModernGL, an explicit region passed to the framebuffer clear call gives you a direct way to clear one rectangle. A draw viewport is useful for the redraw, but it should not be your evidence that the clear covered the same area.
Build a five-tile fixture with one changed tile and four differently colored neighbors. Start with a shape reaching the changed tile's edges, then update it to a smaller shape. Clear and redraw the allocated rectangle while keeping those operations observable as separate steps. Compare pixels after the clear and after the redraw. The cleared tile should be transparent if that is the atlas contract, and the final render should contain no pixels from the first shape.
Use a tile away from the origin, where swapping atlas coordinates for local coordinates would clear the wrong region. Keep the neighbor hashes from the start and compare them at both steps. technical guide and test fixture reproduces the clear behavior with an explicit rectangle and a separate scissor state. The two snapshots distinguish a clear problem from a drawing problem.
Prepared by the FrameSprite Workflow Team with AI assistance. Examples are illustrative unless attributed to a linked fixture.