My idea was to render to an FBO twice the size of the window and discard 3 out of 4 pixels. but discard different pixels every frame. then take the average of 4 frames. Unfortunately it seams that the following code decreases the performance rather than increasing. Either the if statements or more likely the casting to integer has such a performance hit that it is outweighs the 75% discarded pixels.
Code: Select all
if(int(gl_FragCoord.s)%2 == 1 || int(gl_FragCoord.t)%2 == 1) discard;
Code: Select all
if(fract(gl_FragCoord.s/2) > 0.5 || fract(gl_FragCoord.t/2) > 0.5)
Final performance with this is about half as slow instead of 4 times as fast.
Now I'll try to actually jitter the geometry. Calculate the neccessary displacement of every vertex from its z-Coordinate. Advantage: we don't waste FBO space like in the first method.