Fix blend mode and change hairline stroke width

This commit is contained in:
Patrick Walton 2019-01-10 14:19:55 -08:00
parent ffe9abba6b
commit 0da1ee7cd3
2 changed files with 4 additions and 4 deletions

View File

@ -351,7 +351,7 @@ class App {
this.viewBox.origin.x,
this.viewBox.origin.y);
gl.blendEquation(gl.FUNC_ADD);
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE);
gl.enable(gl.BLEND);
gl.drawArraysInstanced(gl.TRIANGLE_FAN, 0, 4, batch.maskTileCount);
gl.disable(gl.BLEND);

View File

@ -61,7 +61,7 @@ const SCALE_FACTOR: f32 = 1.0;
// TODO(pcwalton): Make this configurable.
const FLATTENING_TOLERANCE: f32 = 0.1;
const HAIRLINE_STROKE_WIDTH: f32 = 0.5;
const HAIRLINE_STROKE_WIDTH: f32 = 0.1;
const MAX_FILLS_PER_BATCH: usize = 0x0002_0000;
const MAX_MASKS_PER_BATCH: u16 = 0xffff;