~/talk

Demystifying Pixel Shaders (AGSL)

Talkat droidcon Berlin 2024 · 2024-07-03..07-05· [android]
links:none on file
slides:none on file

Shows how to write AGSL pixel shaders that run compiled on the GPU and integrate into Jetpack Compose via a runtime shader → brush created in drawWithCache and set with setFloatUniform (example: float2 uniform size). Covers distance functions (circle, box), smoothstep and mix to anti‑alias edges, animations driven by a time uniform (example uses 24 rectangles in a rotating animation), a 31‑line shader sample, live reload in Android Studio, Android 13 requirement, and a try/catch pattern for shader compilation failures.

AI-written summary · about

  1. 0:00Introduction
  2. 0:48Pixel shaders and uses
  3. 3:20AGSL and Android role
  4. 9:05Integrating shaders in Compose
  5. 12:20Drawing shapes with shaders
  6. 18:23Combining shapes in shaders
  7. 23:25Animated effects with shaders
  8. 27:04Optimizing shader code
  9. 31:09Debugging shaders in Android Studio
  10. 33:23Backward compatibility
  11. 35:30Advanced shader experiments
  12. 37:18Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.