7layout(set = 0, binding = 1, std140) uniform SpriteExtended {
13 vec4 custom_uniforms[16];
17#define time_f ext.u2.y
20layout(location = 0) out vec4 color;
21layout(set = 0, binding = 0) uniform sampler2D samp;
33 vec2 center = vec2(0.5);
37 float c = cos(a), s = sin(a);
38 return mat2(c, -s, s, c) * d + center;
51 vec2 rippleTC = tc + vec2(
ripple);
53 vec2 tR =
twistAt(tc, 1.0 + r * 5.0);
54 vec2 tG =
twistAt(tc, 1.0 + g * 5.0);
55 vec2 tB =
twistAt(tc, 1.0 + b * 5.0);
57 color.r = texture(samp, mix(rippleTC, tR, 0.5)).r;
58 color.g = texture(samp, mix(rippleTC, tG, 0.5)).g;
59 color.b = texture(samp, mix(rippleTC, tB, 0.5)).b;
layout(set=0, binding=1, std140) uniform SpriteExtended
void main(void)
Executes the fragment shader entry point.
vec3 ripple(ivec2 p, ivec2 size)
Evaluates ripple for this shader effect.
vec2 twistAt(vec2 uv, float strength)
Evaluates twistAt for this shader effect.