
Skia shader playground
Visualize custom Skia shaders in real time & easily integrate into your own project
Created with prompt
[user]: Build a Skia playground mini-app using // Source: @notargs https://twitter.com/notargs/status/1250468645030858753 float f(vec3 p) { p.z -= iTime * 10.; float a = p.z * .1; p.xy *= mat2(cos(a), sin(a), -sin(a), cos(a)); return .1 - length(cos(p.xy) + sin(p.yz)); } half4 main(vec2 fragcoord) { vec3 d = .5 - fragcoord.xy1 / iResolution.y; vec3 p=vec3(0); for (int i = 0; i < 32; i++) { p += f(p) * d; } return ((sin(p) + vec3(2, 5, 12)) / length(p)).xyz1; } uniform float3 iResolution; // Viewport resolution (pixels) uniform float iTime; // Shader playback time (s) uniform float4 iMouse; // Mouse drag pos=.xy Click pos=.zw (pixels) uniform float3 iImageResolution; // iImage1 resolution (pixels) uniform shader iImage1; // An input image. [assistant]: Creating a Skia playground mini-app to visualize the shader code you provided.