Hero image

Antialiasing

What the code does

The code draws multiple red dots in the top left corner of the screen. The dots are drawn with different levels / types of antialiasing to show the effect on graphics fidelity. The dots are an integer number of pixels in diameter and in the screen y-dimension aligned with the pixel grid of the screen. From left to right: (1) the first dot is drawn with no antialiasing and positioned in the x-dimension aligned with the pixel grid of the screen, (2) the second dot is drawn with no antialiasing and positioned in the x-dimension at a fractional pixel position, (3) the third dot is drawn with antialiasing favouring speed of drawing and positioned in the x-dimension at a fractional pixel position, (4) the fourth dot is drawn with hardware antialiasing favouring quality of drawing and positioned in the x-dimension at a fractional pixel position, (5) the fifth dot is drawn with PTB's inbuilt shader antialiasing favouring quality of drawing and positioned in the x-dimension at a fractional pixel position.

Visualisation

The code

Instagram image Instagram image Instagram image Instagram image Instagram image Instagram image