Created
September 26, 2018 03:20
-
-
Save Bjvanminnen/d64dcbd080a25857a9c5f8d83b7baaef to your computer and use it in GitHub Desktop.
Tips for blending with regl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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