link-shader
v0.0.2
Published
Used to link two shaders into a shader program in WebGL.
Downloads
5
Maintainers
Readme
Link-Shader
Used to link two shaders into a shader program in WebGL.
Usage
npm i link-shader
var shaderCompiler = require('compile-shader');
var shaderLinker = require('link-shader');
var gl = document.createElement('canvas').getContext('webgl');
var vertexShader = shaderCompiler(gl, ..., ...);
var fragmentShader = shaderCompiler(gl, ..., ...);
var shaderProgram = shaderLinker(gl, vertexShader, fragmentShader);
gl.useProgram(shaderProgram);
This module is meant to be incorporated via browserify.
Testing
npm t