npm.io
1.1.0 • Published 12 years ago

kami-shader

Licence
MIT
Version
1.1.0
Deps
3
Vulns
0
Weekly
0
Stars
2

kami-shader

stable

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

NPM

//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.

Keywords