glsl-layer

1.0.0 • Public • Published

glsl-layer

stable

Layer texels on top of each other in the same shader.

glsl-layer

Installation 📦

npm i glsl-layer -S

Usage & example 💾

#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 📝

MIT. See LICENSE for details.

Package Sidebar

Install

npm i glsl-layer

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

2.53 kB

Total Files

5

Last publish

Collaborators

  • ayamflow