Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tomblack.ca/llms.txt

Use this file to discover all available pages before exploring further.

A normal map is a second texture where each pixel encodes the surface direction of the original 3D model at that position. When you light your 2D sprite at runtime with a directional light, the shader reads those encoded directions to compute highlights and shadows — creating the illusion of depth without any 3D rendering. Pixelate generates the normal map at capture time by rendering the 3D geometry through the ViewSpaceNormal hidden shader (Hidden/ViewSpaceNormal), which records view-space normals for every frame and writes them into a texture alongside your sprite sheet.

Enabling normal map output

1

Open the PixelateCaptureManager inspector

Select the PixelateCaptureManager GameObject in your scene.
2

Enable Create Normal Map

In the Capture Options section of the Inspector, enable the Create Normal Map toggle (_createNormalMap). This tells Pixelate to run the ViewSpaceNormal shader pass for every frame during capture and write the result to a separate file.
3

Capture

Click Capture. Pixelate writes two files to your export directory:
  • {TargetName}_{ClipName}.png — the diffuse sprite sheet
  • {TargetName}_{ClipName}_NormalMap.png — the normal map sprite sheet
The normal map PNG will appear blue and pink. This is expected — the colors encode surface direction data, not visible color. Red and green channels store horizontal and vertical surface angles; the blue channel represents depth facing toward the camera.

Applying the normal map in your scene

After capturing, create a material that references both textures and apply it to your sprite.
1

Create a material

In the Project window, right-click and choose Create > Material.
2

Assign the ToonLitSprite shader

In the material Inspector, set the Shader dropdown to ToonLitSprite.
3

Assign your textures

  • Set Diffuse Map to your sprite sheet PNG.
  • Set Normal Map to your normal map PNG.
4

Apply the material

Assign the material to the Sprite Renderer on your character GameObject.
5

Add a Directional Light

Confirm your scene has a Directional Light. Rotate it to see the normal map shading respond.
Lighting only works with a Directional Light (Built-in) or a Light 2D (URP). Point lights and spot lights do not interact correctly with the normal maps generated by Pixelate.

Flipping characters horizontally

When your character needs to face the opposite direction, do not set the X scale to -1 on the GameObject’s Transform. Negative scale inverts the normal map’s lighting response and breaks the directional shading entirely.
To flip a character, rotate the GameObject 180 degrees on the Y axis instead of changing the scale. This mirrors the sprite correctly while preserving the normal map’s lighting direction.

Dithering on normal map output

When using Albedo & Normal lighting style, dithering can be applied to smooth color transitions in both the diffuse and normal map outputs. This reduces banding in gradients and contributes to the classic retro appearance.
UseDithering
boolean
default:"true"
Enables dithering for Albedo & Normal conversion output. When disabled, colors are mapped directly to the nearest palette entry with no blending.
DitheringPower
float
default:"0.1"
Range: 01. Controls the intensity of the dithering effect. Lower values produce subtle dithering that is barely visible at normal viewing distances; higher values produce a coarser, more prominent pattern.
DitheringLookupTexture
Texture2D
The matrix texture used to determine the dithering pattern. Replace the default texture to change the shape and density of the dither. A Bayer matrix is used by default.
Keep Dithering Power low (around 0.050.15) for pixel-art output. High values can introduce visible grain that conflicts with the clean look of a restricted palette.