MATERIAL WORKFLOWS
Baking & transparency
Alpha, lightmapping, Bakery integration, and transparency controls.
PACKAGE VERSION 1.1.0On this page
Opaque materialsCutout materialsAlpha sourcesBake Transparency MapBakeryRealtime Global IlluminationMixed lightingPainted materialsEmissionMatching realtime and baked alphaCrowPSX surface shaders include a lightweight Unity meta pass for baked Albedo and Emission, and compatible surface shaders add Bakery alpha-meta output alongside it. Both render pipelines produce the same alpha; they only differ in how the two extraction paths are kept apart.
In the Built-in Render Pipeline the Bakery output is a second pass carrying a custom LightMode, so Unity's Progressive Lightmapper never sees it and never has to choose between the two. Under the Universal Render Pipeline it is folded into the single Meta pass, which returns alpha when Bakery asks for it and ordinary Albedo/Emission otherwise.
Opaque materials#
Opaque materials cast a solid geometric silhouette. Their baked Albedo comes from the regular surface or blended painted layers, Tint, and the bake-color controls exposed by the inspector.
Cutout materials#
Cutout uses the selected alpha source and Alpha Cutoff to decide which pixels exist. With a compatible lightmapper, a fence, grate, leaf card, or torn surface can bake a cutout-shaped shadow instead of the complete rectangular polygon.
Recommended setup:
- Rendering Mode = Cutout
- Correct texture-alpha or Alpha Map source enabled
- Alpha Cutoff matched to the realtime silhouette
- Renderer Cast Shadows enabled
- Z Write enabled for ordinary cutout materials
- Light and receiver included in the bake
Alpha sources#
Depending on the shader, opacity can use:
- Base Texture alpha
- Blended painted-layer alpha
- Separate Alpha Map with selectable channel
- Alpha contrast, power, and bias
- Optional final alpha clip or dither
Bake Transparency Map#
The optional Bake Transparency Map is a Bakery-only override. Use it when Bakery should bake a silhouette that differs from the rendered opacity. Black is opaque and white transmits light; CrowPSX converts it to opacity for the Bakery alpha-meta output.
Unity's Progressive Lightmapper reads transparency from the base texture's alpha and the base color. Use those inputs when baking with Unity.
Why there is no transmission texture to manage#
Unity's lightmapper offers two transparency paths, and a shader picks one by what it declares:
- Monochrome (default). Unity reads the alpha of
_MainTexand_Color. CrowPSX provides both (_Coloris kept in sync with the Tint) so this works with no setup and no generated assets. - RGB transmission. Declaring a
_TransparencyLMtexture property switches the shader to a texture-based path, which supports colored transmission.
CrowPSX deliberately does not declare _TransparencyLM, because that choice is per shader rather than per material. Declaring it opts every material into the texture path, and that path has no empty state: a material left with an empty slot is not treated as opaque, it fails to export, and the object then contributes nothing to the bake, no emission, no shadow even at full opacity, and no indirect light until it is switched back to Opaque. Supporting colored transmission for the few materials that want it would mean generating and maintaining a transmission texture for every transparent material in the project.
The separate Alpha Map is not read by Unity's lightmapper, which reads _MainTex alpha directly. Bakery reads it through the Meta pass. For a Unity bake, composite the alpha map into the base texture's alpha channel.
Bakery#
Compatible surface shaders include a META_BAKERY pass and BAKERY_META_ALPHA_ENABLE in both pipelines. This covers the Surface, Vertex Painting, and Nature families; the Terrain, particle, decal, and skybox shaders have no Bakery path in either pipeline.
CrowPSX provides the material alpha output for Bakery. Configure light contribution, lightmap resolution, and renderer settings in Bakery, and use a Bakery version that supports your render pipeline.
Realtime Global Illumination#
Unity's Enlighten realtime GI works in the Built-in Render Pipeline and is not available under the Universal Render Pipeline, which removed it. A scene authored with it will lose that contribution when opened in URP.
Watch for Realtime Environment Lighting in particular: with it enabled the environment is carried by the realtime GI data instead of the baked lightmap, so under URP the ambient fill disappears and shadows go black. Bake with Realtime Global Illumination disabled for scenes that have to work in both pipelines.
Mixed lighting#
All three of Unity's mixed lighting modes work on Surface, Vertex Painting, and Nature materials in both render pipelines.
- Baked Indirect: the lightmap carries indirect only, and every shadow is realtime. Nothing is shadowed past the shadow distance.
- Shadowmask: realtime shadows near the camera hand over to baked shadows from the shadowmask texture at the shadow distance. Mixed lights also take their baked occlusion from that texture.
- Subtractive: the lightmap carries the full baked result and the main light's direct contribution is subtracted back out where it is shadowed.
The Terrain shader supports the same three modes.
Painted materials#
Painted variants export blended layer Albedo and alpha to compatible shadow and meta paths. Different painted layers can therefore contribute different cutout patterns and baked colors.
Emission#
Supported shaders export unclamped HDR Emission through the meta pass when enabled. Strong realtime glow alone does not guarantee strong baked contribution; the renderer must contribute GI, the material must be marked Baked Emissive, and the lightmapper must have Baked Global Illumination enabled.
Matching realtime and baked alpha#
- Use the same alpha path for realtime and baking when possible.
- Match Alpha Cutoff to the desired silhouette.
- Avoid extreme alpha shaping until the baked result is tested.
- Give the receiving surface enough lightmap resolution.
- Re-bake after changing alpha textures, import settings, UVs, cutoff, or rendering mode.