Shadow Configuration
Genesis lets every material override how it receives shadows — color, softness, intensity, and even a hatched or cross-pattern overlay. It works with URP’s shadow cascades and pairs with the optional PCSS module for soft contact shadows.
When to use it
- Stylized characters that need a warm-key, cool-shadow balance without lighting overrides.
- Mobile projects that want soft-looking shadows without the cost of PCSS.
- Toon materials that need a hard shadow edge separate from cel banding.
- Blob-shadow proxies under animated characters where receive-shadows is off.
Difference from Cel Shading
How it works
When Receive Shadows is on, Genesis samples the main-light shadow attenuation, biases it by _ShadowSoftness, then blends the lit color toward _ShadowColor by _ShadowIntensity. An optional pattern texture is sampled in screen space and masked by the attenuation, so patterns appear only inside shadowed regions.
Properties
Usage
- Make sure Receive Shadows is enabled on the mesh renderer and in this block.
- Pick a Shadow Color complementary to your key light; cool shadows under a warm key read cinematic.
- Dial Softness to taste — 0.05–0.15 matches URP defaults, higher reads as painted.
- Optionally assign a Shadow Pattern for a hand-drawn or comic-book look.
material.SetColor("_ShadowColor", new Color(0.18f, 0.22f, 0.42f));
material.SetFloat("_ShadowIntensity", 0.85f);
material.SetFloat("_ShadowSoftness", 0.12f);Tips & gotchas
- The pattern is screen-space and will not track the surface. That is intentional for the comic look; for surface-locked hatching, use Artistic Effects.
- Cascade seams show up faster with high softness. Use the PCSS module if you need genuinely soft cast shadows.
- Toon and shadow tint double-darken if both the shadow color and the cel shadow color are very dark. Pick one to do the heavy lifting.
- The pattern texture must be single-pass-stereo aware in VR; Genesis ships one that is.
Related
- Cel Shading — self-shadow banding.
- Artistic Effects — surface-locked hatching.
- PCSS Shadow Module — soft contact shadows.
- Blob Shadow Module — projected blob shadows for mobile.
Last updated on