소스 검색

Tiny update + rtt validation test

David Catuhe 7 년 전
부모
커밋
dc4445fbb5
5개의 변경된 파일11개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 0
      dist/preview release/what's new.md
  2. 2 3
      src/Engine/babylon.engine.ts
  3. 1 1
      src/babylon.scene.ts
  4. BIN
      tests/validation/ReferenceImages/customRTT.png
  5. 7 0
      tests/validation/config.json

+ 1 - 0
dist/preview release/what's new.md

@@ -1,6 +1,7 @@
 # 3.2.0
 
 ## Major updates
+- Introduced texture binding atlas. This optimization allows the engine to reuse texture bindings instead of rebinding textures when they are not on constant sampler indexes ([deltakosh](https://github.com/deltakosh))
 
 ## Updates
 - New watcher configuration for VSCode. Now the task only compiles changed files ([sebavan](https://github.com/sebavan))

+ 2 - 3
src/Engine/babylon.engine.ts

@@ -2475,8 +2475,7 @@
             }
         }
 
-        private DrawMode(fillMode: number): number
-        {
+        private DrawMode(fillMode: number): number {
             switch (fillMode) {
                 // Triangle views
                 case Material.TriangleFillMode:
@@ -2951,7 +2950,7 @@
 
         // Textures
         public wipeCaches(bruteForce?: boolean): void {
-            if (this.preventCacheWipeBetweenFrames) {
+            if (this.preventCacheWipeBetweenFrames && !bruteForce) {
                 return;
             }
             this.resetTextureCache();

+ 1 - 1
src/babylon.scene.ts

@@ -3924,7 +3924,7 @@
                 this._engine.scenes.splice(index, 1);
             }
 
-            this._engine.wipeCaches();
+            this._engine.wipeCaches(true);
             this._isDisposed = true;
         }
 

BIN
tests/validation/ReferenceImages/customRTT.png


+ 7 - 0
tests/validation/config.json

@@ -181,6 +181,13 @@
       "referenceImage": "normals.png"
     },
     {
+      "title": "Custom render target",
+      "scriptToRun": "/Demos/CustomRenderTarget/customRenderTarget.js",
+      "renderCount": 10,
+      "functionToCall": "CreateCustomRenderTargetTestScene",
+      "referenceImage": "customRTT.png"
+    },
+    {
       "title": "GLTF Normals",
       "renderCount": 20,
       "scriptToRun": "/Demos/GLTFNormals/index.js",