toneScreens.package
- ..
- .metadata120 B
- README.md2.4 KB
- block.yaml2.8 KB
README.md
Square dot screen on surfaces (styleBlock, Tone)
A square dot halftone screen on the surfaces of things: square dots grow with darkness until they close into solid ink, laid on the surfaces so it stays on things as the camera moves.
Settings this block starts from: shape (1), onSurfaces (1), angle (45), cellPx (8). It shares every setting of the screen shader (see the package README), so any screen swaps for any other with StyleKit.swap(entry, otherScreen, { keepSettings = true }) keeping your tuning.
What it gives up in motion
The screen is laid on the surfaces (along each surface's main axis in styleKit's shared coordinates), so a pan, orbit or dolly does not drag it: the dots stay on the walls and floor. It keeps about the same dot size on screen at any distance by blending two neighbouring screen sizes on the surface, so as you walk closer the dots grow into the next size instead of swelling or sliding; in the narrow distance band where two sizes blend, dots take a mixed shape for a moment. A cell is never drawn smaller than about five pixels: where it would be (a floor grazing to the horizon) it melts into flat tone, so there is no moire or shimmer. On a moving skinned character the dots come from world position and slide across the body. Curved surfaces switch dot direction where their main axis changes, which shows as a seam. Nothing changes on the clock, so there is no flicker.
How it treats content
- Opaque things: screened by their brightness; dark places get big dots or solid ink, light places little or none.
- Transparent things (glass, water): screened by the colour seen through them, with the coordinates of the opaque surface behind them.
- Particles and smoke: screened where they change the picture's brightness, with the coordinates of the surface behind them.
- Sky: screened by its brightness, scaled by
sky(set it to 0 to keep a clean sky). - Fog: fog lightens things, so far away there are fewer dots.
- Skinned characters: screened like everything else; the dots slide on a moving body.
- Foliage: screened; dense leaves can look busy, raise
cellPxor loweramount. - World text: dark letters collect ink; exclude labels a player must read (
StyleKit.options({ exclude = { ... } })). - Black stays black: dots only darken, they add no light.
- Dim rooms: kept dim; this is a Tone block, so the stack's dim guard holds a dark room as dark as it was rendered.