Style Cookbook: Mix Your Own Art Style from Stackable Look Blocks
- ..
- .metadata161 B
- README.md1.6 KB
- module.wgsl5.9 KB
README.md
paperCore (shader module)
The one paper model every paperBlocks paper is built from. pb_sample(uv) returns the sheet at a pixel: its height (felt tooth and grit, long fibres, canvas weave), its tone (tooth shading, fibre tone, blotchy mottling, foxing spots) and how much fibre is there. pb_ground_colour adds ruled lines and, on chalkboards, dust and the ghosts of old wiping. pb_published_height gives the height the shared ground carries (centred on 0.5, as deep as the tooth is tall, so granulation and dry brush feel exactly how much tooth there is). pb_field_finish lets a later Ground block lay its field over the one before by its mask.
Everything sits on surfaces (world position along each surface's main axis, the view direction on the sky), keeps about the same size in the picture by blending two octaves, and fades any part finer than about two drawn pixels to its mean, so the tooth stays on things under a pan, dolly or zoom and never shimmers in the distance or on the low tier. Pure math over styleKit's skCommon, skPatterns and skAnchored; it reads the paper settings every paperBlocks shader declares (tint, toothHeight, toothSharpness, toothSize, fibre, fibreLength, fibreTone, weave, mottle, foxing, rule, ruleColour, ruleSpacing, thirst, emboss, sheen, lights, lightColour, lightTint, dust).
Known limits
- A pass reads the scene's depth only when it also writes the scene picture (#24550), and an unknown blend name draws as replace (#24551).
- A per-object value cannot reach a geometry pass (#24549).
The package README's Known limits lists the rest.