Procházet zdrojové kódy

Set premultipliedAlpha to false in webgpu

Popov72 před 4 roky
rodič
revize
82181c4e48
2 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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;