Port aa to the epic shader
This commit is contained in:
parent
0a9c74525a
commit
a4f280878a
|
@ -13,7 +13,10 @@ vec3 hsl2rgb(vec3 c) {
|
|||
|
||||
void main() {
|
||||
vec4 tc = texture(image, out_uv);
|
||||
float d = tc.r;
|
||||
float aaf = fwidth(d);
|
||||
float alpha = smoothstep(0.5 - aaf, 0.5 + aaf, d);
|
||||
vec2 frag_uv = gl_FragCoord.xy / resolution;
|
||||
vec4 rainbow = vec4(hsl2rgb(vec3((time + frag_uv.x + frag_uv.y), 0.5, 0.5)), 1.0);
|
||||
gl_FragColor = tc.x * rainbow;
|
||||
gl_FragColor = vec4(rainbow.rgb, alpha);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue