glsl-layer
v1.0.0
Published
Layer texels on top of each other in the same shader.
Downloads
4
Maintainers
Readme
glsl-layer
Layer texels on top of each other in the same shader.
Installation :package:
npm i glsl-layer -S
Usage & example :floppy_disk:
#pragma glslify: layer = require('glsl-layer')
attribute vec2 vUv;
uniform sampler2D circle;
uniform sampler2D square;
void main() {
gl_FragColor = layer(
texture2D(circle, vUv),
texture2D(square, vUv)
);
}
License :pencil:
MIT. See LICENSE for details.