gl-react/Examples/VideoBlur/HueRotate.js
2015-09-11 14:11:37 +02:00

24 lines
493 B
JavaScript

const React = require("react");
const GL = require("gl-react");
const glslify = require("glslify");
const shaders = GL.Shaders.create({
hueRotate: {
frag: glslify(`${__dirname}/hueRotate.frag`)
}
});
class HueRotate extends GL.Component {
render () {
const { width, height, hue, children: tex } = this.props;
return <GL.View
shader={shaders.hueRotate}
width={width}
height={height}
uniforms={{ hue, tex }}
/>;
}
}
module.exports = HueRotate;