Skip to content

cimaron/glsl2js

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
ir
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

glsl2js

Install

npm install
gulp build

Usage

var state = glsl.compile(src, {target : glsl.target.fragment});

if (!state.getStatus()) {
	console.log(state.getErrors());
} else {
	var prgm = new glsl.program();
	prgm.addObjectCode(state.getIR(), glsl.target.fragment);
	prgm.build();
	
	prgm.setUniformData('someVec4Uniform', [1, 2, 3, 4]);
	progm.setAttributeData('someVec4Attr', [1, 2, 3, 4])
	
	prgm.fragment();
	
	console.log(prgm.context.result_f32.slice(0, 4));
}

License

The MIT License (http://opensource.org/licenses/MIT)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published