3 ms·
So I decided to try combining the way you did it with what I did before, and I came up with this method, which is effectively equivalent to the 4x AA in the top
by entropicdrifter 9y ago
So I decided to try combining the way you did it with what I did before, and I came up with this method, which is effectively equivalent to the 4x AA in the top-level comment:
void mainImage( out vec4 fragColor, in vec2 fragCoord ) {
bool evenFrame = (iFrame % 2) == 0;
float x;
float y = 0.25;
if(evenFrame) {
x = 0.25;
}
else {
x = -0.25;
}
vec3 c1 = getColor(fragCoord + vec2(x, y));
vec3 c2 = getColor(fragCoord + vec2(-x, -y));
vec2 texCoord = fragCoord.xy / iResolution.xy;
vec3 texColor = texture(iChannel0, texCoord).rgb;
fragColor = vec4(mix(texColor, (c1+c2), 0.5), 1.0);
}