Ink and Gouache: Toon and Cel-Shaded Materials
README.md
toonInk
The toonMaterials ink outline. Every frame it enqueues one geometry pass at afterLighting that redraws each object ToonInk lists with the toonInk shader through a runtime material (what a geometry pass takes). A material keeps the shader program it was made with, so once a second the feature compares its material with the program the engine currently holds for the toonInk shader (renderer.compiledShaders()) and makes it again on that exact program when they differ (a recompile, an engine restart); until a program exists it draws nothing. Colour and smoothing come from the package's ink/toonInk material asset. The hull: front faces culled, depth-tested against the lit scene, writing no depth, pushed out by the shared ink weight in real centimetres. The result is a dark violet ink line of one weight hugging every outlined silhouette, hidden wherever something stands in front of it. An empty list enqueues nothing. The colour is the shared ink colour; the line is drawn 3 cm thick, and a live change of ToonLook's inkWidth does not reach the drawn line (engine issue #21428).