mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-14 12:29:30 -07:00
Glyphs now blend additively, and the renderer's output buffer is cleared before it's drawn to.
This commit is contained in:
@@ -277,6 +277,15 @@ export default (regl, config) => {
|
||||
|
||||
// We render the code into an FBO using MSDFs: https://github.com/Chlumsky/msdfgen
|
||||
const render = regl({
|
||||
blend: {
|
||||
enable: true,
|
||||
func: {
|
||||
srcRGB: "src alpha",
|
||||
srcAlpha: 1,
|
||||
dstRGB: "dst alpha",
|
||||
dstAlpha: 1
|
||||
}
|
||||
},
|
||||
vert: `
|
||||
precision lowp float;
|
||||
attribute vec2 aPosition, aCorner;
|
||||
@@ -394,6 +403,11 @@ export default (regl, config) => {
|
||||
},
|
||||
resources => {
|
||||
update();
|
||||
regl.clear({
|
||||
depth: 1,
|
||||
color: [0, 0, 0, 1],
|
||||
framebuffer: output
|
||||
});
|
||||
render(resources);
|
||||
},
|
||||
null,
|
||||
|
||||
Reference in New Issue
Block a user