Optical Illusions in Shadertoy

This is a compilation of some of the optical illusions and perceptual effects I have made in Shadertoy.

Warning - flashing images. Some of these shaders involve flashing images. If you are at risk of a seizure due to photosensitive epilepsy or other conditions, don’t click play, navigate away.

Many of these effects are based on the fantastic work of Akiyoshi Kitaoka @AkiyoshiKitaoka.

Click the Title of each shader to view the shader in Shadertoy.

Colour Illusions

Benham’s Disk

Many people perceive colour when this black and white pattern is rotated.

Click play to start the rotation.

Color Constancy

The bus appears to be red although the pixels are actually grey.

Click play to zoom in on the bus.

Motion Illusions

These shaders display still images which may appear to move.

Geometry

Rice on Checker

The lines in this landscape are all straight.

Click play to start the animation. Pause and click on the shader to remove the dots from the corner of the squares.

Café Wall Illusion

The famous Café Wall Illusion. The horizontal lines are parallel, despite appearing to be at different angles to each other.

Misc

Craik-O’Brien-Cornsweet Effect

This is an illustration of the Craik-O’Brien-Cornsweet Effect that I used in my Digital Dragons talk. The shade of the upper and lower face are the same.

Click in the image and press Space to add an overlay of the same shade.

Brain Melting Pattern

Click play, then click on image to animate (or don’t if you want to avoid a headache).

Hidden Image

Best viewed fullscreen, an image is hidden in subtle shades of this striped pattern. For some people, following the red square with your eyes can reveal the image.

Stereogram

I’m not sure if this counts as an illusion but here is my shader to generate a dot sterogram / autostereogram / “Magic Eye” picture.