From c61d115c23a6ee9d645db42a36b1e30fd392f4b6 Mon Sep 17 00:00:00 2001 From: CCharles99 Date: Fri, 5 Jun 2026 11:48:38 +0100 Subject: [PATCH] applied premultiply alpha before each video frame --- src/source/video_source.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/source/video_source.ts b/src/source/video_source.ts index 989c6114ddd..5b63320e34c 100644 --- a/src/source/video_source.ts +++ b/src/source/video_source.ts @@ -212,6 +212,7 @@ class VideoSource extends ImageSource<'video'> { this.width = this.video.videoWidth; this.height = this.video.videoHeight; } else if (!this.video.paused) { + context.pixelStoreUnpackPremultiplyAlpha.set(true); this.texture.bind(gl.LINEAR, gl.CLAMP_TO_EDGE); gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, this.video); }