link-shader

0.0.2 • Public • Published

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

Dependents (0)

Package Sidebar

Install

npm i link-shader

Weekly Downloads

2

Version

0.0.2

License

Beerware

Last publish

Collaborators

  • nickdesaulniers