소스 검색

WebGPU Inspector and NodeMaterial Editor :-)

Sebastien Vandenberghe 6 년 전
부모
커밋
fbdd25de25
3개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 1
      Tools/DevLoader/BabylonLoader.js
  2. 1 1
      localDevWebGPU/index.html
  3. 1 1
      src/Engines/WebGPU/webgpuPipelineContext.ts

+ 4 - 1
Tools/DevLoader/BabylonLoader.js

@@ -207,7 +207,10 @@ var BABYLONDEVTOOLS;
                     this.loadLibrary(moduleName, module.libraries[i], module);
                 }
                 // Allow also loaders in CORE.
-                else if (coreOnly && moduleName === "loaders") {
+                else if (coreOnly && (moduleName === "loaders" ||
+                    moduleName === "inspector" ||
+                    moduleName === "nodeEditor" ||
+                    moduleName === "materialsLibrary")) {
                     this.loadLibrary(moduleName, module.libraries[i], module);
                 }
             }

+ 1 - 1
localDevWebGPU/index.html

@@ -140,7 +140,7 @@
                         engine.initAsync(shadercOptions).then(() => onLoad(engine));
                     }
 
-                    // BABYLONDEVTOOLS.Loader.debugShortcut(engine);
+                    BABYLONDEVTOOLS.Loader.debugShortcut(engine);
                 }
                 else {
                     alert('BabylonJS is not supported.')

+ 1 - 1
src/Engines/WebGPU/webgpuPipelineContext.ts

@@ -463,6 +463,6 @@ export class WebGPUPipelineContext implements IPipelineContext {
      * @param color4 defines the value to be set
      */
     public setDirectColor4(uniformName: string, color4: IColor4Like): void {
-        this.setFloat4(uniformName, color4.b, color4.g, color4.b, color4.a);
+        this.setFloat4(uniformName, color4.r, color4.g, color4.b, color4.a);
     }
 }