kami-shader
v1.1.0
Published
shader utils for WebGL / kami
Downloads
29
Maintainers
Readme
kami-shader
Shader utility for kami. Wraps webgl-compile-shader with more convenience features.
Will throw an error if the shader couldn't compile; complete with line numbers and other debugging details.
Usage
//create a new shader
var shader = require('kami-shader')(gl, {
vertex: vertSource,
fragment: fragSource
});
//bind it, use it...
shader.bind();
//set some uniforms after binding
shader.setUniformf("myvec3", 0, 1, 0);
License
MIT, see LICENSE.md for details.