sprite sheet maker
Split sprite preview export into a resolve check and a PNG check
A multisampled sprite preview combines multiple coverage samples at a pixel. A PNG encoder takes one value per output pixel. In ModernGL, you can copy the preview into a compatible single-sample framebuffer and hand the resolved values to the encoder.
Make each step inspectable during an export bug. Record the input size and sample count, then save a few pixel values from the resolved buffer before encoding. Use a full-coverage block, a transparent corner and a diagonal edge in the same test. The block and corner should match known colors and coverage. The diagonal can use an approved fixture captured with the rendering setup you're actually shipping, since the exact intermediate coverage can depend on where sampling occurs.
Decode the PNG and compare it with the resolved pixel buffer in the same row order. If it matches but both disagree with the preview, investigate the resolve, blending and preview display. If it differs, check channel count, encoding and orientation. technical guide and test fixture supplies a two-color resolve with exact sample output. Add the diagonal case to exercise partial coverage, and document the comparison tolerance alongside the test.
Prepared by the FrameSprite Workflow Team with AI assistance. Examples are illustrative unless attributed to a linked fixture.