From 7b9d4673865e15a9182546ee32689edb9c402018 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 31 Oct 2018 00:19:02 +0100 Subject: view: enable alpha blending --- src/view/renderer/Renderer.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/view/renderer/Renderer.ts b/src/view/renderer/Renderer.ts index f2f72a6..9358515 100644 --- a/src/view/renderer/Renderer.ts +++ b/src/view/renderer/Renderer.ts @@ -14,6 +14,10 @@ export default class Renderer { this.gl.clearColor(0.0, 0.0, 0.0, 1.0); + this.gl.enable(this.gl.BLEND); + this.gl.blendFunc(this.gl.ONE, this.gl.ONE_MINUS_SRC_ALPHA); + this.gl.pixelStorei(this.gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1); + this.setSize(); } -- cgit v1.2.3