Standalone GLSL to JavaScript compiler. Includes linking and runtime generation.
See: https://github.com/cimaron/glsl2js
var state = glsl.compile(source, {target : glsl.target.fragment);
if (!state.getStatus()) {
console.log(state.getErrors());
console.log(state.Warnings());
return;
}
var prgm = glsl.createProgram('js');
prgm.addObjectCode(state.getIR(), glsl.target.fragment);
if (prgm.error) {
console.log(prgm.error);
} else {
prgm.build();
}
prgm.setUniformData('someVec4Uniform', [1, 2, 3, 4]);
progm.setAttributeData('someVec4Attr', [1, 2, 3, 4])
prgm.fragment();