Occlusion & Lightmap
Occlusion & Lightmap exposes the standard AO and lightmap controls plus a bent-normal slot for proper indirect-specular direction. It grounds a Genesis material into baked lighting and gives crevices the contact-darkening that PBR needs to read.
When to use it
- Every Lit material in a lightmapped scene.
- Hero props where baked AO sells the contact shadows.
- Indirect specular — bent normals bias the environment sample toward unoccluded directions.
- Mobile baked-lighting workflows.
AO vs SSAO
How it works
The shader samples _OcclusionMap from the selected channel, scales by _OcclusionStrength, and multiplies into the diffuse and indirect terms. When a bent normal is provided, it replaces the geometric normal for the SH and reflection-probe samples only; direct lighting stays accurate.
Properties
Usage
- Bake an AO map with the AO Baker tool, using a UV1 unwrap.
- Pack AO into the G channel of a Metallic/AO/Smoothness texture (Unity convention).
- Set the AO Channel to G and dial Strength to taste; 0.8 is the sweet spot.
- For hero props, bake a bent normal in the same pass and assign it for cleaner indirect.
material.SetTexture("_OcclusionMap", aoTex);
material.SetFloat("_OcclusionStrength", 0.85f);
material.SetTexture("_BentNormalMap", bentNormal);Tips & gotchas
- AO multiplies indirect only by default, matching PBR convention. Raise Affects Direct only for stylized art.
- Lightmap UVs (UV1) must be unique; overlapping UV1 produces bake artifacts.
- Bent normals are tangent space — use the same import settings as a regular normal map.
- AO is free when packed into an existing mask. Bent normals add one sample, usually worth it.
Related
- AO Baker — GPU-baked AO and bent normals.
- Normal Mapping — the bent normal is the indirect cousin.
- Shadows — receive-shadow path.
- Texture Channel Packer — pack AO into MAS textures.
Last updated on