Skip to content

Normals

Purpose

Owns capture of view-space normal maps and flat albedo for Snap Studio Pro exports.

This territory renders a prefab's surface normals (view space, encoded to RGB) and its flat unlit albedo by temporarily swapping renderer materials and reading back through the existing capture path, without owning export orchestration or pipeline shader shipping.

Owns

  • View-space normal-map capture
  • Flat albedo capture (unlit material base colour)
  • Temporary material-swap rendering for these passes
  • Colour-space handling for normal-map values (raw-linear conversion)
  • Restoration of original materials after capture

Does NOT Own

  • Export orchestration
  • Capture request building (when/why a pass runs)
  • File saving / output path derivation
  • Pipeline shader shipping (the normals shader lives under Shaders/ + GeneratedShaders/)
  • Panel UI layout
  • Studio lighting workflows

Allowed Dependencies

Normals may depend on:

  • Unity rendering/material APIs
  • The capture context abstraction (IPreviewCaptureContext)
  • Diagnostics/logging

Normals should avoid depending on:

  • export orchestration systems
  • panel/UI systems
  • window lifecycle systems

Notes

This folder owns how normal-map and flat-albedo passes render and read back, not when they run.

Capture/Export systems decide: - whether a normal map / flat albedo is requested - how the resulting textures are saved

Normals own: - the material-swap render - the view-space encoding - the raw-linear correction for normal values

Currently URP-only — gated by the presence of the URP normals / Unlit shaders, returning null so callers fall back to the standard lit capture on other pipelines.

Future Candidates

  • Port the normals shader to Built-in / HDRP if demand warrants, keeping the capture flow pipeline-agnostic.
  • Keep this territory capture-only; do not absorb export orchestration or UI.
  • Maintain reusable capture behaviour across static, icon, and animation export paths.