Hero image

Checkerboard Texture

What the code does

Exploits dynamic texture scaling to draw a checkerboard texture very efficiently using onboard filtering in PTB. The original 4 x 4 pixel texture is scaled up by 90% with nearest neighbour filtering. Also demonstrates how to rotate textures when drawing them to the screen (see the animated texture demos for more information on texture rotation).

Visualisation

The code

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