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
22layout(location = 0) in vec2 tc;
23layout(set = 0, binding = 0) uniform sampler2D samp;
34 const mat3 toYIQ = mat3(
36 0.587, -0.274, -0.523,
39 const mat3
toRGB = mat3(
41 0.956, -0.272, -1.106,
45 float ca = cos(a), sa = sin(a);
46 yiq.yz = mat2(ca, -sa, sa, ca) * yiq.yz;
55 uv.x += sin(uv.y * 14.0 +
time_f * 1.7) * 0.012;
56 uv.y += sin(uv.x * 11.0 +
time_f * 1.3) * 0.012;
57 vec3 c = texture(samp, uv).rgb;
59 float lum = dot(c, vec3(0.299, 0.587, 0.114));
60 c = mix(vec3(
lum), c, 1.7);
61 color = vec4(clamp(c, 0.0, 1.5), 1.0);
layout(set=0, binding=1, std140) uniform SpriteExtended
void main(void)
Executes the fragment shader entry point.
vec3 toRGB(uvec3 color)
Evaluates toRGB for this shader effect.
vec3 hueRotate(vec3 color, float angle)
Evaluates hueRotate for this shader effect.
float lum(vec3 c)
Evaluates lum for this shader effect.