7layout(set = 0, binding = 1, std140) uniform SpriteExtended {
13 vec4 custom_uniforms[16];
18#define iResolution ext.u0.zw
19#define time_f ext.u2.y
22layout(location = 0) in vec2 tc;
23layout(set = 0, binding = 0) uniform sampler2D samp;
35 float modVal = mod(x, length * 2.0);
36 return modVal <= length ? modVal : length * 2.0 - modVal;
45 return sin(uv.x * 12.0 + uv.y * 14.0 +
time_f * 0.8) * 0.5 + 0.5;
53 float radius = length(uv);
54 float angle = atan(uv.y, uv.x);
56 angle +=
swirl * radius * 1.5;
59 float wave = sin(radius * 12.0 -
time_f * 3.0) * 0.5 + 0.5;
61 float cloudNoise =
smoothNoise(uv * 3.0 + vec2(modRadius, angle * 0.5));
63 cloudNoise = pow(cloudNoise, 1.5);
64 float r = sin(angle * 3.0 + modRadius * 8.0 +
wave * 2.0) * cloudNoise;
65 float g = sin(angle * 5.0 - modRadius * 6.0 +
wave * 4.0) * cloudNoise;
66 float b = sin(angle * 7.0 + modRadius * 10.0 -
wave * 3.0) * cloudNoise;
68 vec3 col = vec3(r, g, b) * 0.5 + 0.5;
69 vec3 texColor = texture(samp, tc).rgb;
70 col = mix(col, texColor, 0.25);
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.
float pingPong(float x, float length)
Evaluates pingPong for this shader effect.
vec2 swirl(vec2 uv, float centerRadius, float swirlAmount)
Evaluates swirl for this shader effect.
float smoothNoise(vec2 uv)
Evaluates smoothNoise for this shader effect.