All examples · Shaders · As Markdown, for AIs

Sprite maps

What this example shows

A sprite's material carries extra pictures by name, as a model's does, and its shader reads them with sampleMap_name(uv). localUv() is where the pixel is across the sprite, so a grain mask stays put while the coin spins (the left coin reads it at the sheet's uv and it jumps with every frame). A text crumbles letter by letter, water drifts through noise.

On a map, layerUv() runs across the whole layer and localUv() across each tile.

Click the preview first so it hears the keyboard. L switches the shine between the two.

Starting
Starting
—