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;
31float hash12(vec2 p){
return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453123);}
39 x = x / (x + vec3(1.0));
40 return pow(x, vec3(1.0 / 2.2));
50 float off = 1.5 * px.x;
52 col.r = texture(samp, uv + vec2(off, 0.0)).r;
53 col.g = texture(samp, uv).g;
54 col.b = texture(samp, uv - vec2(off, 0.0)).b;
59 float scan = sin((uv.y *
iResolution.y) * 1.5) * 0.06;
63 col += vec3(bleed * 0.001, 0.0, -bleed * 0.001);
82 float sharpAmt = 0.35;
83 col += (col -
blur) * sharpAmt;
86 float v = smoothstep(0.95, 0.25, distance(uv, c));
90 color = vec4(clamp(col,0.0,1.0), 1.0);
layout(set=0, binding=1, std140) uniform SpriteExtended
void main(void)
Executes the fragment shader entry point.
vec4 blur(sampler2D image, vec2 uv, vec2 resolution)
Evaluates blur for this shader effect.
float hash12(vec2 p)
Evaluates hash12 for this shader effect.
float n(vec2 p)
Evaluates n for this shader effect.
vec3 compositeEffect(vec2 uv)
Evaluates compositeEffect for this shader effect.
vec3 tonemap(vec3 x)
Evaluates tonemap for this shader effect.