reduce-draw-calls

Installation
SKILL.md

Cut draw calls, ranked by cost

Work the ladder in order and stop at the first rung that clears the budget. Each rung trades away less flexibility than the next; skipping straight to a custom renderer or hand-written mesh merge costs more engineering time than the draw calls it saves.

Measure first

Read app.stats.drawCalls.total (or the forward/depth/shadow breakdown) before changing anything, or drop in MiniStats for a live overlay. Every rung below is proved against this number, not against intuition about what "looks expensive."

Draw count alone does not identify the bottleneck. Test sensitivity to pixel cost by halving the effective pixel ratio (Math.min(graphicsDevice.maxPixelRatio, window.devicePixelRatio)) and calling app.resizeCanvas(). Verify the backbuffer shrank and compare frame times at the same scene state. If frame time improves materially, prioritize resolution, multisampling and per-pixel shader cost. Otherwise profile CPU and GPU work before choosing a rung; restore the original ratio after the test.

Rung 1: stop drawing invisible things

Installs
107
GitHub Stars
24
First Seen
Aug 26, 2026
reduce-draw-calls — playcanvas/skills