A browserify transform stream that optimizes your glslify shaders using glsl-optimizer, the library used in Unity for mobile shader optimization.
Use the glslify-optimize
transform after using glslify
for it to work
correctly:
browserify -t glslify -t glslify-optimize
var browserify = require('browserify')
browserify('index.js')
.transform('glslify')
.transform('glslify-optimize')
.pipe(process.stdout)
MIT. See LICENSE.md for details.