Shadow Rendering Performance
summary
Shadows cause extra GPU work because the renderer creates an off-screen pass to rasterize a layer before blurring or offsetting it, causing frame drops when many shadows appear; using a shadowPath or pre-rendered shadow image avoids repeated passes, while layer rasterization caches the result but increases memory and breaks when shapes change. Tools named are the Animation instrument, Xcode Organizer and the view debugger which shows per-layer off-screen counts. Effects like blur, vibrancy and masking incur the same cost.
AI-written summary Β· about
chapters (12)
- 0:00Shadow rendering basics
- 1:04Shadows impact performance
- 2:32Render loop process
- 5:43Drawing shadows in render phase
- 7:53Avoid off-screen shadow passes
- 10:44Rasterization trade-offs
- 11:48Image views for shadows
- 12:53Measuring render loop impact
- 14:18Xcode performance metrics
- 14:59View debugger render passes
- 16:02Off-screen passes in other effects
- 17:05Summary
related talks
37mRendering performance inside out
40mAndroid Graphics Performance
25mRendering Performance from the Ground Up
27mGotta Go Fast (A Performance and Instruments Talk)
58mRendering performance from the ground up
23mUnderstanding Render Loop to optimise SwiftUI
42mRendering performance from the ground up
31mJank Busters - Chrome Rendering Performance
