Jelajahi Sumber

Merge pull request #5349 from sebavan/master

Fix Highlight layer multi material issue
sebavan 6 tahun lalu
induk
melakukan
334de011cc
2 mengubah file dengan 5 tambahan dan 3 penghapusan
  1. 3 1
      dist/preview release/what's new.md
  2. 2 2
      src/Layer/babylon.effectLayer.ts

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

@@ -45,7 +45,6 @@
 ### Materials Library
 
 ## Bug fixes
-- Add missing effect layer to asset container ([TrevorDev](https://github.com/TrevorDev))
 
 ### Core Engine
 - Fixed a bug with `mesh.alwaysSelectAsActiveMesh` preventing layerMask to be taken in account ([Deltakosh](https://github.com/deltakosh))
@@ -54,6 +53,9 @@
 - Handle properly the `LinesMesh` `intersectionThreshold` by using its value directly when the intersection against a `Ray` is checked, instead of extending the `BoundingInfo` accordingly ([barroij](https://github.com/barroij))
 - Fixed the `LineEdgesRenderer` used for edge rendering of `LinesMesh` handle properly LinesMesh made of disconnected lines + Make it work for instance of `LinesMesh` ([barroij](https://github.com/barroij))
 - Fixed `Matrix.toNormalMatrix`function ([barroij](https://github.com/barroij))
+- Add missing effect layer to asset container ([TrevorDev](https://github.com/TrevorDev))
+- Fixed effect layer compatibility with multi materials ([Sebavan](https://github.com/Sebavan))
+
 ### Viewer
 
 ### Loaders

+ 2 - 2
src/Layer/babylon.effectLayer.ts

@@ -343,7 +343,7 @@ module BABYLON {
                 return false;
             }
 
-            if (!material.isReady(subMesh.getMesh(), useInstances)) {
+            if (!material.isReadyForSubMesh(subMesh.getMesh(), subMesh, useInstances)) {
                 return false;
             }
 
@@ -452,7 +452,7 @@ module BABYLON {
 
             // Check
             if (!currentEffect.isReady()) {
-                return;
+                return;
             }
 
             for (var i = 0; i < this._postProcesses.length; i++) {