Przeglądaj źródła

Set premultipliedAlpha to false in webgpu

Popov72 4 lat temu
rodzic
commit
82181c4e48
2 zmienionych plików z 2 dodań i 1 usunięć
  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.
      * 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
      * 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._canvas = canvas;
         this._options = options;
         this._options = options;
+        this.premultipliedAlpha = false;
 
 
         this._hardwareScalingLevel = 1;
         this._hardwareScalingLevel = 1;
         this._mainPassSampleCount = options.antialiasing ? this._defaultSampleCount : 1;
         this._mainPassSampleCount = options.antialiasing ? this._defaultSampleCount : 1;