Fancy animated UI with AGSL shaders in Jetpack Compose | by Jakhongir Madaminov | Apr, 2023

Image by Dawson Lovell — Unsplash
private const val GREYSCALE_SHADER = """
uniform float2 childResolution;
uniform shader background;
half4 main(float2 fragCoord)
half4 color = background.eval( float2(fragCoord.x + childResolution.x, fragCoord.y + childResolution.y + 60));
color.rgb = half3(dot(color.rgb, half3(0.2126, 0.7152, 0.0722)));
return color;

"""
color.rgb = half3(dot(color.rgb, half3(0.2126, 0.7152, 0.0722)))

Next Post

Dennis Kampe honored after 40 years with Cascadia Tech

Dennis Kampe When Cascadia Tech Academy first opened its doors in 1983 (at that time known as the Clark County Skills Center), Dennis Kampe was the coordinator of student services and “quickly went up the ranks,” according to David Cole, current director of the Cascadia Tech Academy Foundation. Early on, […]
Dennis Kampe honored after 40 years with Cascadia Tech