|
@@ -299,7 +299,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.needAlphaBlendingForMesh(mesh)) {
|
|
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
|
|
@@ -321,7 +321,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.needAlphaBlendingForMesh(mesh)) {
|
|
this._engine.restoreStencilState();
|
|
this._engine.restoreStencilState();
|
|
}
|
|
}
|
|
}
|
|
}
|