What problem does it solve?
Debugging Gum's MonoGame rendering pipeline is hard because draw-order bugs, stale scissor state, and render-target artifacts span two independent GPU batchers (SpriteBatch and Apos.Shapes ShapeBatch) with subtle cross-cycle state. This Skill documents the internal contracts of Renderer, SpriteBatchStack, GumBatch, and BatchOrchestrator so you can diagnose and fix rendering bugs correctly.
Core Features & Use Cases
- Batch transition semantics: Explains BatchKey transitions, why empty BatchKey means no flush, and how SpriteBatch and ShapeBatch interleave to determine on-screen paint order.
- Clipping and scissor rules: Documents why ShapeBatch.Begin must receive a scissor-enabled RasterizerState and why mid-walk clip changes must flush the open custom batch.
- Render-target pipeline: Covers the two-phase PreRender walk, cross-layer RenderTargetTextureSource binding, premultiplied vs straight alpha bake behavior, and post-process effect blitting contracts.
- Use Case: When text labels bleed outside a ScrollViewer's clip region or shapes render in the wrong order across GumBatch Begin/End cycles, use this Skill to trace the exact state-management rule being violated.
Quick Start
Ask the AI to diagnose why shapes inside a clipped Gum container render outside the clip region using the gum-monogame-rendering skill.