Преглед на файлове

Fix check if materials needs alpha blending in OutlineRenderer

Marko Mlinaric преди 6 години
родител
ревизия
2257e6d661
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/Rendering/outlineRenderer.ts

+ 2 - 2
src/Rendering/outlineRenderer.ts

@@ -296,7 +296,7 @@ export class OutlineRenderer implements ISceneComponent {
         this._savedDepthWrite = this._engine.getDepthWrite();
         this._savedDepthWrite = this._engine.getDepthWrite();
         if (mesh.renderOutline) {
         if (mesh.renderOutline) {
             var material = subMesh.getMaterial();
             var material = subMesh.getMaterial();
-            if (material && material.needAlphaBlending) {
+            if (material && material.needAlphaBlending()) {
                 this._engine.cacheStencilState();
                 this._engine.cacheStencilState();
                 // Draw only to stencil buffer for the original mesh
                 // Draw only to stencil buffer for the original mesh
                 // The resulting stencil buffer will be used so the outline is not visible inside the mesh when the mesh is transparent
                 // The resulting stencil buffer will be used so the outline is not visible inside the mesh when the mesh is transparent
@@ -318,7 +318,7 @@ export class OutlineRenderer implements ISceneComponent {
             this.render(subMesh, batch);
             this.render(subMesh, batch);
             this._engine.setDepthWrite(this._savedDepthWrite);
             this._engine.setDepthWrite(this._savedDepthWrite);
 
 
-            if (material && material.needAlphaBlending) {
+            if (material && material.needAlphaBlending()) {
                 this._engine.restoreStencilState();
                 this._engine.restoreStencilState();
             }
             }
         }
         }