LookLightweight
Outline & toon shading
Cartoon shading with drawn edges.
Flat bands of light and drawn edges in place of smooth shading: the cartoon and comic-book look. Cheap to run and it reads well at any size.
- Breaks when
- outline pass cost scales with scene size
- Also called
- cel shading, MeshToonMaterial, OutlinePass, inverted hull
Prompts
Comic-book product viewer
Three.js: MeshToonMaterial with a 3-step gradientMap (DataTexture of 3 gray values, NearestFilter), one DirectionalLight, and outlines from the pmndrs OutlineEffect (edgeStrength 3, visibleEdgeColor ink) or a normal/depth Sobel ShaderPass. Flat paper background, no environment map. The pointer rotates the object ±25° with damping. Warm pastel base color.
Inverted-hull outlines
Outlines without post-processing: for each mesh add a second draw with BackSide, a black MeshBasicMaterial, and vertices pushed along their normals by 0.02 in the vertex shader (onBeforeCompile). Explain when it fails (hard-edged low-poly meshes) and the fix (smooth normals for the hull only).
Stepped light in a custom shader
In a ShaderMaterial, quantise NdotL into three bands with smoothstep transitions of width 0.02, add a specular step at 0.9 and a rim step at 0.35, and a screen-space hatch pattern in the darkest band. Provide uniforms for the three band colors.
Related
Resources · 1
- three.js example: toon materialmrdoobsite · code · demoJun 15, 2026