Selaa lähdekoodia

Fix effect from EffectWrapper not being created correctly in WebGPU

Popov72 4 vuotta sitten
vanhempi
commit
5321324aae
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  1. 1 2
      src/Materials/effectRenderer.ts

+ 1 - 2
src/Materials/effectRenderer.ts

@@ -265,11 +265,10 @@ export class EffectWrapper {
                 creationOptions.onCompiled
                 creationOptions.onCompiled
             );
             );
         } else {
         } else {
-            this.effect = new Effect(effectCreationOptions,
+            this.effect = creationOptions.engine.createEffect(effectCreationOptions,
                 creationOptions.attributeNames || ["position"],
                 creationOptions.attributeNames || ["position"],
                 uniformNames,
                 uniformNames,
                 creationOptions.samplerNames,
                 creationOptions.samplerNames,
-                creationOptions.engine,
                 defines,
                 defines,
                 undefined,
                 undefined,
                 creationOptions.onCompiled,
                 creationOptions.onCompiled,