blob: 82b8c7a2c1803a68440eb6c443934ffd7b442ac3 [file] [log] [blame]
#version 100
precision mediump float;
uniform sampler2D uSampler0_Stage0;
uniform vec4 uTexDom_Stage0;
uniform vec3 ucircle_Stage1;
uniform float uRTHeight;
varying vec4 vColor;
varying vec2 vMatrixCoord_Stage0;
void main() {
vec4 fragCoordYDown =
vec4(gl_FragCoord.x, uRTHeight - gl_FragCoord.y, 1.0, 1.0);
vec4 output_Stage0;
{
// Stage 0: TextureDomain
output_Stage0 = (vColor * texture2D(
uSampler0_Stage0,
clamp(vMatrixCoord_Stage0, uTexDom_Stage0.xy, uTexDom_Stage0.zw)));
}
vec4 output_Stage1;
{
// Stage 1: Circle
float d = ucircle_Stage1.z - length(fragCoordYDown.xy - ucircle_Stage1.xy);
d = clamp(d, 0.0, 1.0);
output_Stage1 = (output_Stage0 * d);
}
gl_FragColor = output_Stage1;
}