#version 450 core #ifdef GL_ES precision mediump float; #endif uniform vec2 resolution; uniform float ticks; uniform int program; uniform sampler2D images[4]; layout (binding = 0,rgba32f) uniform image2D backbuffer; uniform float ratios[4]; uniform int idx[2]; uniform float vel[2]; uniform float params[4]; out vec4 fragColor; float random (in float x) { return fract(sin(x)*43758.5453123)-0.5; } vec2 coordinates(int i) { vec2 st = gl_FragCoord.xy/resolution.xy; return st; } void main (void) { vec4 img; vec2 st = coordinates(idx[0]); img = texture2D(images[idx[0]],st); st = coordinates(idx[1]); img = pow(img, texture2D(images[idx[1]],st)); fragColor = img; }