mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 11:48:24 +00:00
A software rasterizer in commons, because Canvas.drawVertices is common Compose API but only hardware-accelerated from API 29 against our minSdk 26 — on Android 8 and 9 it silently draws nothing. Doing it here also buys a real depth buffer, which lattice geometry needs the moment two objects are authored to share an edge, and it makes the renderer testable headless. Implements what DECK-0003 §4 decides rather than leaving it to taste: unlit with vertex colours interpolated across a face, both sides of every triangle drawn and nothing culled by winding, a face carrying its own colour filled flatly so its seams stay exact, and no invented geometry. Positions convert from the exact lattice to floats here and nowhere earlier. 15 tests, one per rule §4 decides, plus the depth ordering that a painter's-algorithm fallback would get wrong. Checked by eye as well: all seven objects on the network render, the one named Triforce comes out as a Triforce, and the 118-vertex one is a coherent skyline from every yaw. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JwXApJjoZYtkD3sPRWbPNa