#version 120
uniform sampler2D iChannel0;

//uniform sampler2D noiseTexture;
//uniform vec2 noiseOffset;
//uniform vec2 noiseScale;

varying float disintegrationFrag;
varying float outlineColorIndexFrag;

#include "shaders/logic.glsl"

void main()
{
	//float noise = texture2D(noiseTexture, mod((gl_FragCoord.xy + noiseOffset)*noiseScale,1.0)).r;

	//gl_FragColor = vec4(le(length(gl_TexCoord[0].xy - 0.5),0.5*disintegrationFrag));
	//gl_FragColor = vec4(vec3(noise), 1.0);
	//gl_FragColor = vec4(1.0, ge(noise,disintegrationFrag), 0.0, 0.0);
	//gl_FragColor = vec4(ge(noise,disintegrationFrag), 1.0, 0.0, 0.0);

	gl_FragColor = vec4(1.0 - disintegrationFrag, outlineColorIndexFrag, 0.0, 1.0)*le(length(gl_TexCoord[0].xy - 0.5),0.5);
}