1.0.1 • Published 10 years ago
gl-normal-material v1.0.1
gl-normal-material
Normal material for 3d rendering.
As defined in gl-material, a material is a fragment shader and a set of styles with defaults. This material sets the RGB values of each vertex with the mesh's normal vector, which looks really cool and can also be useful for debugging. 
STYLE PARAMETERS
saturation:floatcolor saturation, 0 is white, 1 is full color, default0.75
absolute:boolwhether or not to take the absolute value, defaulttrue
install
npm install gl-normal-materialusage
Use with gl-material to generate a compiled shader, given a gl context
var normal = require('gl-normal-material')
var material = require('gl-material')(gl, normal)Or just get the fragment shader for use elsewhere
var fragment = require('gl-normal-material').fragment