Sets the current material as a normal material.
A normal material sets surfaces facing the x-axis to red, those facing the y-axis to green, and those facing the z-axis to blue. Normal material isn't affected by light. It’s often used as a placeholder material when debugging.
Note: normalMaterial()
can only be used in WebGL mode.
Examples
Notice any errors or typos? Please let us know. Please feel free to edit src/webgl/material.js and open a pull request!
Related References
copyToContext
Copies the shader from one drawing context to another.
inspectHooks
Logs the hooks available in this shader, and their current implementation.
modify
Returns a new shader, based on the original, but with custom snippets of shader code replacing default behaviour.
setUniform
Sets the shader’s uniform (global) variables.