WEBGL STUDY / MATERIAL PATCHING
A material can rewrite the vertex stage.
`onBeforeCompile` lets a built-in material keep its lighting and normal pipeline while a small patch injects time-varying twist math. Separate cache keys keep opposite shader variants from sharing the wrong program.
Preparing study—
Creating two patched MeshNormalMaterial variants…
- backend
- —
- geometry
- —
- materials
- —
- cache keys
- —
- shader time
- —
- patch
- —
—
Study failed.The lesson could not initialize.
The official Lee Perry-Smith GLB is replaced with a procedural sphere. The material patch and cache-key lifecycle remain the lesson; this lab makes no asset or pixel-parity claim.
THREE.JS FOUNDATIONS / PATCH THE PIPELINE, OWN THE KEY