fantasyToon.shader
- .metadata114 B
- README.md1.5 KB
- properties.yaml1.6 KB
- shader.wgsl4.9 KB
README.md
fantasyToon
A cel-shaded surface for cartoon fantasy worlds, with flat glowing runes that pulse: the toon rune stone (runeStoneToon). The scene's sun is cut into quantize_steps hard bands with a tinted, lifted shadow (shadow_lift, shadow_tint); every point and spot light adds one hard band in its own colour; a hard rim band (rim, rim_width, rim_color) and a small hard highlight (spec). Ink lines come from the albedo: anything darker than ink_threshold is drawn flat in ink_color, unlit, so outlines stay crisp in sun and in moonlight. The albedo's alpha is an emission mask: from 0.4 up it is drawn as a flat outer band glow_color * glow_intensity (keep it near 1 so it stays saturated), and above 0.75 as a core band glow_hot times brighter, whitened by glow_core. A toon halo lights the stone around each glyph: the mask at a coarser mip (halo_bias) cut into two hard bands at halo_threshold and 2.5x that, halo_intensity times the albedo, in the glow colour. All of it breathes between glow_floor and full at pulse_speed cycles a second, rolling once across each tile so it stays seamless. Animated from the shader's gameplay time alone, with nothing desktop-only in it (checked moving on desktop; not checked in a browser by the author). One texture (albedo + mask), no storage buffers. It lights itself, so the engine's albedo/roughness debug passes draw it magenta. After scifiMaterials' scifiToon (Hull and Hologram, MIT).