> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pixelate.tomblack.ca/llms.txt
> Use this file to discover all available pages before exploring further.

# Normal maps

> Export matching normal maps for Pixelate sprite sheets and use them with 2D lighting.

Normal maps let a 2D sprite react to lights while still using a flat sprite sheet. In URP, Pixelate exports the normal map and links it to the diffuse sprite sheet for you.

## Enable normal-map output

<Steps>
  <Step title="Open the profile">
    Select the capture manager and use its local profile settings, or open a saved `PixelateProfile` asset if you are sharing settings across capture managers.
  </Step>

  <Step title="Enable normal map">
    Check the **Normal Map** section.
  </Step>

  <Step title="Set lighting steps">
    Use **Lighting Steps** to control how many lighting bands Pixelate uses. The default is `2`.
  </Step>

  <Step title="Set material pipeline">
    Choose **URP** unless your project must stay on Built-in Render Pipeline. Pixelate's demo content is built for URP, and URP supports Sprite-Lit 2D lighting with normal maps out of the box.
  </Step>

  <Step title="Preview">
    In **Preview**, switch draw mode between **Lit**, **Unlit**, and **Normal** to check the output.
  </Step>
</Steps>

## Output files

When **Normal Map** is enabled, Pixelate writes a second PNG next to the diffuse sprite sheet. After import, Pixelate assigns that normal-map PNG as the diffuse sprite sheet's `_NormalMap` secondary texture, so URP 2D lights can find it automatically.

| Capture        | Normal-map file                 |
| -------------- | ------------------------------- |
| Static image   | `{TargetName}_N.png`            |
| Animation clip | `{TargetName}_{ClipName}_N.png` |

For animation capture, each Source Clip gets its own normal-map atlas and Pixelate links it to that clip's diffuse atlas.

## Use normal maps with URP

URP is the recommended workflow because Pixelate's demo content is built for it and URP supports Sprite-Lit 2D lighting with normal maps out of the box.

<Steps>
  <Step title="Use a 2D Renderer">
    Make sure your URP asset uses a 2D Renderer.
  </Step>

  <Step title="Set Light Render Textures">
    Open the 2D Renderer asset, expand **Light Render Textures**, and set **Render Scale** to `1`.
  </Step>

  <Step title="Use a Sprite-Lit material">
    Use `Universal Render Pipeline/2D/Sprite-Lit-Default` on the Sprite Renderer that displays the exported sprites.
  </Step>

  <Step title="Enable normal maps on the light">
    On each `Light2D` that should affect the sprite, turn on **Normal Maps** in the Light 2D component.
  </Step>

  <Step title="Test with the demo setup">
    Open `Assets/Pixelate/DEMO/Scenes/Visualize.unity` for a working 2D lighting example, or use the render assets in `Assets/Pixelate/DEMO/URP` for a pre-configured URP setup.
  </Step>
</Steps>

<Note>
  You do not need to manually assign the generated `_N.png` to the diffuse sprite sheet in URP. Pixelate links it as a secondary texture during export.
</Note>

## Built-in fallback

Use Built-in only when the project cannot use URP. The included `ToonLitSprite` shader is available for fallback projects, but URP is the smoother path for 2D lighting and normal-map sprites.

<Tip>
  If lighting appears reversed after flipping a character, rotate the character 180 degrees on the Y axis instead of using negative X scale.
</Tip>
