Selaa lähdekoodia

Fix build, still .d.ts to go

sebavan 5 vuotta sitten
vanhempi
commit
bbec61c72d
2 muutettua tiedostoa jossa 10 lisäystä ja 3 poistoa
  1. 8 0
      src/Engines/WebGPU/webgpuPipelineContext.ts
  2. 2 3
      src/Engines/webgpuEngine.ts

+ 8 - 0
src/Engines/WebGPU/webgpuPipelineContext.ts

@@ -412,4 +412,12 @@ export class WebGPUPipelineContext implements IPipelineContext {
     public setDirectColor4(uniformName: string, color4: IColor4Like): void {
         this.setFloat4(uniformName, color4.r, color4.g, color4.b, color4.a);
     }
+
+    public _getVertexShaderCode(): string | null {
+        return this.sources.vertex;
+    }
+
+    public _getFragmentShaderCode(): string | null {
+        return this.sources.fragment;
+    }
 }

+ 2 - 3
src/Engines/webgpuEngine.ts

@@ -17,7 +17,6 @@ import { WebGPUPipelineContext, IWebGPUPipelineContextVertexInputsCache } from '
 import { IPipelineContext } from './IPipelineContext';
 import { DataBuffer } from '../Meshes/dataBuffer';
 import { WebGPUDataBuffer } from '../Meshes/WebGPU/webgpuDataBuffer';
-import { IInternalTextureLoader } from "../Materials/Textures/internalTextureLoader";
 import { BaseTexture } from "../Materials/Textures/baseTexture";
 import { IShaderProcessor } from "./Processors/iShaderProcessor";
 import { WebGPUShaderProcessor } from "./WebGPU/webgpuShaderProcessors";
@@ -1252,7 +1251,7 @@ export class WebGPUEngine extends Engine {
         return texture;
     }
 
-    public createCubeTexture(rootUrl: string, scene: Nullable<Scene>, files: Nullable<string[]>, noMipmap?: boolean, onLoad: Nullable<(data?: any) => void> = null, onError: Nullable<(message?: string, exception?: any) => void> = null, format?: number, forcedExtension: any = null, createPolynomials: boolean = false, lodScale: number = 0, lodOffset: number = 0, fallback: Nullable<InternalTexture> = null, excludeLoaders: Array<IInternalTextureLoader> = []): InternalTexture {
+    public createCubeTexture(rootUrl: string, scene: Nullable<Scene>, files: Nullable<string[]>, noMipmap?: boolean, onLoad: Nullable<(data?: any) => void> = null, onError: Nullable<(message?: string, exception?: any) => void> = null, format?: number, forcedExtension: any = null, createPolynomials: boolean = false, lodScale: number = 0, lodOffset: number = 0, fallback: Nullable<InternalTexture> = null): InternalTexture {
         var texture = fallback ? fallback : new InternalTexture(this, InternalTextureSource.Cube);
         texture.isCube = true;
         texture.url = rootUrl;
@@ -1326,7 +1325,7 @@ export class WebGPUEngine extends Engine {
 
             onLoad && onLoad();
         };
-        webglEngineTexture = this._decodeEngine.createCubeTexture(rootUrl, scene, files, noMipmap, onLoadInternal, onError, format, forcedExtension, createPolynomials, lodScale, lodOffset, fallback, excludeLoaders);
+        webglEngineTexture = this._decodeEngine.createCubeTexture(rootUrl, scene, files, noMipmap, onLoadInternal, onError, format, forcedExtension, createPolynomials, lodScale, lodOffset, fallback);
 
         this._internalTexturesCache.push(texture);