Skip to content

ayamflow/glsl-layer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages