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) in vec2 tc;
22layout(set = 0, binding = 0) uniform sampler2D samp;
32 return fract(sin(dot(p, vec2(12.9898,78.233))) * 43758.5453);
45 float b =
noise(i + vec2(1.0, 0.0));
46 float c =
noise(i + vec2(0.0, 1.0));
47 float d =
noise(i + vec2(1.0, 1.0));
49 vec2 u = f * f * (3.0 - 2.0 * f);
50 return mix(a, b, u.x) + (c - a) * u.y * (1.0 - u.x) + (d - b - c + a) * u.x * u.y;
60 float amplitude = 1.0;
63 for(
int i = 0; i < 5; i++) {
76 float distortionStrength = 0.02;
77 vec2 distortion = vec2(
82 vec2 distortedTC = tc + distortion * distortionStrength;
84 color = texture(samp, distortedTC);
layout(set=0, binding=1, std140) uniform SpriteExtended
void main(void)
Executes the fragment shader entry point.
float fbm(vec2 point)
Evaluates fbm for this shader effect.
float noise(vec2 p)
Evaluates noise for this shader effect.
float smoothNoise(vec2 uv)
Evaluates smoothNoise for this shader effect.