#version 420

uniform usampler2D uintRands;
uniform sampler2D floatRands;
in vec2 fragTexCoord;

uniform float lowerBound, upperBound;

out vec4 result;

void main( void ) 
{
	uvec4 uintRand = texture( uintRands, fragTexCoord );
	vec4 floatRand = texture( floatRands, fragTexCoord );
	
	bool isValid   = (floatRand.x > lowerBound) && (floatRand.x < upperBound);
	
    result = isValid ? 
				vec4( uintRand ) / 65535.0 : 
				vec4( 0,0,0,1 ) ;
}