瀏覽代碼

Set premultipliedAlpha to false in webgpu

Popov72 4 年之前
父節點
當前提交
82181c4e48
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 1
      src/Engines/thinEngine.ts
  2. 1 0
      src/Engines/webgpuEngine.ts

+ 1 - 1
src/Engines/thinEngine.ts

@@ -515,7 +515,7 @@ export class ThinEngine {
     /**
      * Defines whether the engine has been created with the premultipliedAlpha option on or not.
      */
-    public readonly premultipliedAlpha: boolean = true;
+    public premultipliedAlpha: boolean = true;
 
     /**
      * Observable event triggered before each texture is initialized

+ 1 - 0
src/Engines/webgpuEngine.ts

@@ -290,6 +290,7 @@ export class WebGPUEngine extends Engine {
 
         this._canvas = canvas;
         this._options = options;
+        this.premultipliedAlpha = false;
 
         this._hardwareScalingLevel = 1;
         this._mainPassSampleCount = options.antialiasing ? this._defaultSampleCount : 1;