Skip to content

Instantly share code, notes, and snippets.

@Bjvanminnen
Created September 26, 2018 03:20
Show Gist options
  • Save Bjvanminnen/d64dcbd080a25857a9c5f8d83b7baaef to your computer and use it in GitHub Desktop.
Save Bjvanminnen/d64dcbd080a25857a9c5f8d83b7baaef to your computer and use it in GitHub Desktop.
Tips for blending with regl
// I always seem to spend forever trying to find an old project where I've done this before, so
// here I create a gist
const regl = createREGL({canvas, attributes: {preserveDrawingBuffer: true}});
const renderer = regl({
// ...
depth: {
enable: false
},
blend: {
enable: true,
func: {
src: 'src alpha',
dst: 'one minus src alpha'
},
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment