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.

Pixelate supports three lighting styles that control what lighting information is baked into the output textures. Albedo & Normal separates color from lighting so your sprite can respond to a real-time directional light at runtime. Cell Shaded bakes toon shading directly into the sprite frames. Default Lit captures exactly what Unity’s standard lighting produces. Set the Lighting Style field on PixelateCaptureManager to choose.
Lighting only works with a Directional Light. This applies to both the Built-in and Universal Render Pipeline. Point lights and spot lights are not supported for normal-map-based 2D lighting.

Lighting style reference

StyleLightingStyle valueOutput
Albedo & Normal0Flat-color diffuse texture + normal map texture
Cell Shaded1Sprite with toon shading baked in
Default Lit2Sprite with standard Unity lighting captured as-is

Albedo & Normal

LightingStyle.albedoAndNormal produces two textures for every capture: a flat-color diffuse sheet and a matching normal map. The diffuse sheet contains no baked shading — colors are the raw surface albedo of your model. The normal map encodes the surface direction of the original 3D geometry, which a lit 2D material uses at runtime to calculate directional lighting. Assign both textures to a lit material:
  • Built-in pipeline — use the included ToonLitSprite shader. Set Diffuse Map to the sprite sheet and Normal Map to the normal map PNG.
  • URP — use Universal Render Pipeline/2D/Sprite-Lit-Default. Set Primary Texture to the sprite sheet and Normal Map Texture to the normal map PNG.
This mode gives you the most flexibility because lighting is computed at runtime. Move your scene’s Directional Light and the sprite responds without re-capturing.
UseLightingOnOutline
boolean
default:"false"
When outlines are enabled alongside Albedo & Normal output, this setting controls whether the outline pixels are included in the normal map lighting calculation. Enable it to have outlines respond to directional light; disable it to keep outlines at a constant unlit color.

Cell Shaded

LightingStyle.cellShaded renders the model using Pixelate’s CellShadedRendering shader during capture. Toon shading is baked directly into the sprite frames — you see the final shaded look in the output texture rather than a flat albedo. The shape of the shading bands is controlled by the Cell Shaded Lookup texture. This is a gradient texture where each horizontal band maps a lighting value to an output color. Fewer distinct colors in the lookup texture produce chunkier, more stylized shading; a smooth gradient produces soft toon shading.
CellShadedLookup
Texture2D
Lookup texture for cell-shaded lighting. Each pixel maps a lighting intensity to an output shade. Replace the default texture to customize the number and softness of shading bands.
CellShadeNormalOutput
boolean
default:"false"
When enabled, cell shading is also applied to the normal map output. Use this in combination with NormalMapCellShadingLookup to stylize the normal map alongside the diffuse output.
NormalMapCellShadingLookup
Texture2D
Lookup texture used when CellShadeNormalOutput is enabled. Controls how lighting bands appear in the cell-shaded normal map output.
Start with the default CellShadedLookup texture and duplicate it to create variations. Reducing the lookup to two or three solid color bands gives a classic retro toon look with hard shadow edges.

Default Lit

LightingStyle.defaultLit captures the model exactly as Unity renders it with your scene’s current lighting setup. Pixelate does not apply any custom shaders during capture — what you see in the scene view is what gets written to the sprite sheet. Use this mode when you want the captured sprite to match the appearance of your 3D scene directly, for example when using stylized 3D materials that already look the way you want in 2D.

Included shaders

Pixelate includes the following shaders. Some are used internally during capture and do not need to be assigned manually; others are intended for your runtime materials.
ShaderPurpose
ToonLitSpriteBuilt-in pipeline runtime shader. Apply to a sprite material to receive directional lighting via a normal map.
CellShadedRenderingUsed internally during capture when Cell Shaded lighting style is selected.
FlatColorRenderingRenders geometry with flat, unlit color. Used internally during capture.
NormalMapRenderingRenders normal map data to a texture. Used internally during capture.
PalletteMappingMaps rendered colors to the active palette. Used internally during capture.
PalletteSnappingSnaps each pixel to the nearest palette entry. Used internally during capture.
PixelLightApplies pixel-level lighting calculations. Used internally during capture.
ViewSpaceNormalCaptures view-space normals from the 3D model per frame. Used internally for normal map generation.
You only need to interact with ToonLitSprite directly — assign it to your sprite material in the Built-in pipeline. All other shaders are managed internally by Pixelate and do not require manual configuration.