Can you help me? Whats wrong this that shader? It's just a black screen:
//Fragment
#version 400
//https://www.shadertoy.com/view/ldjGzV
out vec4 fragData0;
uniform float currenttime;
float time = currenttime/1000;
uniform vec2 buffersize;
uniform sampler2D texture1;
uniform bool isbackbuffer;
float range = 0.05;
float noiseQuality = 250.0;
float noiseIntensity = 0.0088;
float offsetIntensity = 0.02;
float colorOffsetIntensity = 1.3;
float rand(vec2 coord)
{
return fract(sin(dot(coord.xy ,vec2(12.9898,78.233))) * 43758.5453);
}
float verticalBar(float pos, float uvY, float offset)
{
float edge0 = (pos - range);
float edge1 = (pos + range);
float x = smoothstep(edge0, pos, uvY) * offset;
x -= smoothstep(pos, edge1, uvY) * offset;
return x;
}
void main(void)
{
vec2 uv = gl_FragCoord.xy / buffersize.xy;
if (isbackbuffer) uv.y = 1.0 - uv.y;
for (float i = 0.0; i < 0.71; i += 0.1313)
{
float d = mod(time * i, 1.7);
float o = sin(1.0 - tan(time * 0.24 * i));
o *= offsetIntensity;
uv.x += verticalBar(d, uv.y, o);
}
float uvY = uv.y;
uvY *= noiseQuality;
uvY = float(int(uvY)) * (1.0 / noiseQuality);
float noise = rand(vec2(time * 0.00001, uvY));
uv.x += noise * noiseIntensity;
vec2 offsetR = vec2(0.006 * sin(time), 0.0) * colorOffsetIntensity;
vec2 offsetG = vec2(0.0073 * (cos(time * 0.97)), 0.0) * colorOffsetIntensity;
float r = texture(texture1, uv + offsetR).r;
float g = texture(texture1, uv + offsetG).g;
float b = texture(texture1, uv).b;
fragData0 = vec4(r, g, b, 1.0);
}