Demystifying Pixel Shaders (AGSL)
summary
Custom pixel shaders run per pixel on the GPU and are now usable in Compose via Android 13’s RuntimeShader; examples include a 10×10 checkerboard driven by uniform float2 iScaling (scale computed from width/DP) and a circle drawn with a distance function plus smoothstep for a 20‑pixel anti‑aliased edge. Animations use a linear two‑second loop forwarded as a uniform (0→1 mapped to angle × 2π). Live coding uses Compose for Desktop with file-watch live reload and a public GitHub sample.
AI-written summary · about
chapters (9)
- 0:00Pixel shaders and AGSL
- 3:45What pixel shaders are
- 9:49Shaders in Jetpack Compose
- 14:55Drawing with distance functions
- 25:06Animating shaders with uniforms
- 28:45Shader compatibility across platforms
- 30:54Live coding shaders
- 37:35AGSL learning curve
- 40:48Q&A on shaders
related talks
39mDemystifying Pixel Shaders (AGSL)
43mPixel with Superpowers: Modern Android UI with AGSL Shaders
34mUnlocking the Power of Shaders in Android with AGSL and Jetpack Compose
18mShaders are awesome
36mCreative Coding with Compose
16mAndroid Graphics
40mImplementing custom fragment shaders
28mFragment Shaders In Flutter: A whole new World
