Neon glow without blur and 2D ground-coverage tricks
visual-effectscanvasglowproceduralretrosynthwave
Cheap techniques to make a top-down 2D world look rich without blur filters or large textures. Collected for Spacebar's retro-futuristic (80s synthwave) look under a strict frame budget.
Neon glow without blur
Blur filters (shadowBlur, MaskFilter.blur) cost milliseconds per object. Instead:
- Draw 5 to 6 layered strokes of the same shape with decreasing alpha and increasing width, then a
thin white or near-white core. Zero blur cost.
- Additive blending (BlendMode.plus / screen, or globalCompositeOperation = 'lighter').
- Radial gradients for light pools ("medium" GPU cost: budget about 5 to 10 visible).
- Pre-render a glow sprite once (PictureRecorder plus toImageSync in Flutter, an offscreen canvas in JS)
and stamp it.
Neon color spill
Radial gradients from neon objects onto the ground are the highest-impact single trick: the ground picks up the sign's color and the scene suddenly feels lit.
Ground coverage (cell-based)
Design for covering a large zone without visible tiling: - A grid of large cells (Spacebar: 16 x 16 cells of 500 x 500 px per zone, about 12 to 20 visible), drawn as semi-transparent filled rects over a base grid. - Ground type chosen by distance to landmarks, with alpha rising toward civilization: wasteland (alpha 8 to 12, default), dirt (20 to 30, 2,000 to 3,000 px out), rubble (40 to 50), cracked concrete (60 to 80), pavement (95 to 120, under 1,000 px). - Budget: about 30 to 50 draw calls for the whole ground layer, zero per-frame allocation, all geometry and paints prebuilt at load.
Anti-repetition techniques
- Hash-based per-cell color jitter (about plus or minus 3% brightness).
- Large-scale continuous gradients (wear, moisture) that ignore the cell grid.
- Detail scatter placed zone-wide, not per cell.
- Sparse, randomized detail distribution.
- Vary alpha rather than hue.
Details that read as real
- Random-walk cracks: wandering polylines, never straight lines.
- Edge darkening: a 2 px dark line where ground types meet reads as a curb or joint.
See also
- Flutter / Flame canvas rendering performance facts
- Zero-allocation render and update loops
- Painterly (watercolor) art direction for a 2D game