Fix blend mode and change hairline stroke width
This commit is contained in:
parent
ffe9abba6b
commit
0da1ee7cd3
|
@ -345,13 +345,13 @@ class App {
|
|||
gl.uniform1i(this.maskTileProgram.uniforms.FillColorsTexture, 1);
|
||||
// FIXME(pcwalton): Maybe this should be an ivec2 or uvec2?
|
||||
gl.uniform2f(this.maskTileProgram.uniforms.FillColorsTextureSize,
|
||||
this.shaderCount,
|
||||
1.0);
|
||||
this.shaderCount,
|
||||
1.0);
|
||||
gl.uniform2f(this.maskTileProgram.uniforms.ViewBoxOrigin,
|
||||
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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue