
#version 330 core
in vec2 texCoord;

out vec4 fragColor;


uniform sampler2D texture0;
uniform float tim3 = 21.0;

uniform float minval = 0.0;
uniform float maxval = 0.0;
uniform float value3 = 2.0;
uniform float value4 = 2.0;
uniform float contrast = 0.025;
uniform float edge = 0.02;
void main()
{
	vec4 color;
	
    vec2 xy = texCoord.xy;
	vec4 colors=texture(texture0,xy);
	float valDiff = maxval-minval;
	float newMinval=mod(minval,1.0);
	float newMaxval=mod(maxval,1.0);
	
	xy.x+=((abs(1.0-colors.r))*2.0-1.0)*minval;
	xy.y+=(colors.r*2.0-1.0)*maxval;
	colors=texture(texture0,xy);


	
	 
	  fragColor=colors;
	  
 
}