7layout(set = 0, binding = 1, std140) uniform SpriteExtended {
13 vec4 custom_uniforms[16];
17#define iResolution ext.u0.zw
18#define time_f ext.u2.y
21layout(location = 0) out vec4 color;
22layout(set = 0, binding = 0) uniform sampler2D samp;
33vec2
vortexUV(vec2 tc0,
float turn,
float radialShift) {
35 vec2 ar = vec2(aspect, 1.0);
36 vec2 p = (tc0 - 0.5) * ar;
37 float r = length(p) + 0.001;
38 float a = atan(p.y, p.x);
39 float wave = sin(r * 46.0 -
time_f * 10.0 + a * 5.0);
41 r += radialShift +
wave * 0.04;
42 return fract(vec2(cos(a), sin(a)) * r / ar + 0.5);
51 vec2 ub =
vortexUV(tc, 0.88, -0.012);
52 vec3 rgb = vec3(texture(samp, ur).r,
55 float r = length(tc - 0.5);
56 rgb *= 0.85 + 0.35 * sin(r * 70.0 -
time_f * 9.0);
57 color = vec4(rgb, texture(samp, ug).a);
layout(set=0, binding=1, std140) uniform SpriteExtended
void main(void)
Executes the fragment shader entry point.
vec3 wave(ivec2 p, ivec2 size)
Evaluates wave for this shader effect.
vec2 vortexUV(vec2 tc0, float turn, float radialShift)
Evaluates vortexUV for this shader effect.