← All resources

Local UVs for Sprites in Sprite Sheet/Atlas (Cyanilux)

Auto-discovered

Blog Intermediate

Cyanilux

Visit resource ↗

Description

Local UVs for Sprites in Sprite Sheet/Atlas is a March 2024 Cyanilux post on per-sprite 0-1 UVs when sprites use Multiple mode or a Sprite Atlas, so mesh UVs cover only a sub-rectangle of the texture.

The Remapping UV path feeds textureRect-based _UVRemap from a SpriteRenderer C# script, with notes on MaterialPropertyBlock versus material instances across Built-in RP and URP versions. Shader Graph and HLSL show the same uv remap, plus an optional MAD-friendly form.

URP alternatives use object-space Position with pivot offset (2023.1+) or renderer World Bounds Inverse Lerp (2022.2+) for world-aligned coords that do not rotate with the sprite; each section warns about dynamic batching and edit-mode limits.

One free page with screenshots and no asset download. Handy for masked or gradient effects on atlased sprites; Cyanilux tutorials are often cited in Unity 2D shader threads.