-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.frag
More file actions
29 lines (20 loc) · 724 Bytes
/
test.frag
File metadata and controls
29 lines (20 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
vec3 colorA = vec3(0.0,0.0,0.0);
vec3 colorB = vec3(1.0,1.0,1.0);
in vec4 colorOut;
in vec4 TexCoord;
float circle(in vec2 _st, in float _radius){
vec2 dist = _st-vec2(0.5);
return 1.-smoothstep(_radius-(_radius*0.01),
_radius+(_radius*0.01),
dot(dist,dist)*4.0);
}
void main() {
//gl_FragColor = vec4(colorB, 1.0);
vec2 st = TexCoord.xy;
float pct = pow(1.064 - distance(st, vec2(0.5)), 3.848);
float colorThreshold = circle(st, 0.9);
gl_FragColor = vec4(colorOut.rgb, pct*colorOut.a);
//y = pow(st.y, 1.0);// + distance(st.x, 0.5);
//gl_FragColor = vec4(st.y, 1.0-st.y, 0.0, 1.0);
//gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
}