Flutter Blog Brandon DeRosier Aug 6, 2024

Getting Started With Flutter GPU

Article Summary

Brandon DeRosier from Flutter introduces Flutter GPU, a low-level graphics API that lets developers build custom renderers entirely in Dart and GLSL—no native code required. This changes everything for 3D rendering in Flutter.

Flutter 3.24 debuts Flutter GPU and Flutter Scene, enabling developers to create custom renderers and import 3D glTF models directly into Flutter apps. Both are in preview on the main channel, require Impeller, and currently support iOS, macOS, and Android.

Key Takeaways

Critical Insight

Flutter now offers low-level GPU access for building specialized 2D and 3D renderers without touching native platform code, opening the door for a new ecosystem of cross-platform rendering solutions.

The article reveals why Flutter deliberately avoided building a single generic 3D renderer, and what that philosophy means for performance-critical rendering use cases.

About This Article

Problem

Flutter developers couldn't build specialized renderers for cases like Spine 2D animations. When they used Canvas.drawVertices for skeletal mesh deformation, CPU-based vertex transforms became a performance bottleneck.

Solution

Brandon DeRosier's team built Flutter GPU with shader support. Bone transforms now feed into vertex shaders as uniform arrays, letting the GPU calculate final vertex positions in parallel based on skeleton state and per-vertex bone weights.

Impact

Flutter can now handle cross-platform rendering on iOS, macOS, and Android without native code. The flutter_gpu_shaders package compiles shader bundles automatically through native assets build hooks, making the process straightforward for developers.