Demystifying Pixel Shaders (AGSL)
summary
Shows actual AGSL code compiled into a RuntimeShader + ShaderBrush and used as a Compose modifier, passing uniforms like uniform float2 size and animating via rememberInfiniteTransition to drive a rotation (angle = time 2π). Demonstrates distance functions for circles/rectangles, smoothstep antialiasing, coordinate transforms and a 2x2 rotation matrix on a 200x200 canvas, and notes compatibility: Android 13 (API 33)*, SKSL/GLSL lineage and an OpenGL backport with source on GitHub.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 3:00What are shaders
- 8:49Integrating shaders into Compose
- 10:15Drawing shapes with shaders
- 15:37Transforming shapes
- 18:35Complex shader effects
- 19:41Animating shaders
- 24:20Live coding
- 26:54Shader compatibility
- 29:25Experimental shader ideas
- 30:11Summary
related talks
34mUnlocking the Power of Shaders in Android with AGSL and Jetpack Compose
43mPixel with Superpowers: Modern Android UI with AGSL Shaders
56mPixel Shader-based UI Components and Let’s Write Your First Pixel Shader
40mImplementing custom fragment shaders
26mCreative experiments with WebGL shaders in JavaScript
01h 01mUI Components on Pixel Shaders — Write Your First Shader
16mTransform Alchemy
34mOne simple animation explained
