wcShadowPool.styleBlock
- .metadata213 B
- README.md3.8 KB
- block.yaml1.6 KB
README.md
Pooled shadows (styleBlock, Fill)
Paints shadows as denser, uneven pools of watercolor wash that lean toward a shadow colour (a violet, an indigo, a sepia) with pigment gathered at the shadow's edge: coloured, painterly watercolor shadows.
Settings: threshold (0.45), softness (0.25), density (0.5), tint (0.75), uneven (0.35), poolSize (0.8), shadowColour (#54548c), contact (0.8), contactSize (1.0). Low quality changes no setting; like every block it runs at half resolution there.
It reads the frame, depth, the base colour (albedo), the frame as rendered (rendered) and the scene's pigment set. How much light reaches a pixel is the rendered frame against its own base colour where the renderer gives one (the deferred path; two images aligned pixel for pixel, so surface texture cancels out and is never printed back as shade), and the rendered brightness otherwise (low tier, forward path), averaged over five taps. Pigment also pools where surfaces meet, whichever way the light falls (contact, contactSize): at the foot of a wall, under a crate, inside a corner, found from world positions on surfaces facing up, where water would collect. Where the light falls below threshold, or a meeting of surfaces closes in, the paint gets denser (density), mottled (uneven, poolSize), with a little more pigment along the shadow's edge, and leans toward the pigment set's shadow pigment, or shadowColour with no set picked (tint). It sits after the wash, bleed and glaze in the Fill chain (rank 40, stacking chain). Its material form is the pooled shadow inside wcPaint.shaderModule, which the watercolorSurface shader uses.
What it gives up in motion
Shadow is read per pixel from the light each frame, so a moving shadow carries its pool with it and a moving light moves the pools exactly; nothing lags. The mottling inside a pool is laid on surfaces and stays put on still things, but slides across moving characters. A shadow edge that crosses threshold slowly (a sunset) moves smoothly, since the edge is soft by softness.
How it treats content
- Opaque things: shadows pool and lean toward the shadow pigment; lit areas are left as they came.
- Transparent things (glass, water): they have no base colour of their own in the copy, so the light estimate is read from the surface behind; dark tinted glass can read as shadow and pool a little.
- Particles and smoke: no base colour or depth; dark smoke can read as shadow and take the shadow tint, bright sparks stay lit.
- Sky: left exactly as it came; the sky is never pooled.
- Fog: fogged distance is brighter than its surface, so far shadows pool less, which matches aerial perspective.
- Skinned characters: their own shading and shadows pool like any surface; the mottling slides on a moving body. Use
WatercolorHero.paintfor pools that stay on a hero. - Foliage: the dark undersides of leaf masses pool into coloured shade, which reads as painted trees.
- World text: dark text can read as shadow and take the shadow tint; exclude signs and labels a player must read.
- Black stays black: it returns through
sk_finish, and density only deepens paint (eased off where paint is already dark), so an unlit pixel stays black.
Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.