提交 e0d8718a 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #12304 from Astrak/outline-line-sprite

Outline line sprite
......@@ -186,7 +186,7 @@ THREE.OutlinePass.prototype = Object.assign( Object.create( THREE.Pass.prototype
function VisibilityChangeCallBack( object ) {
if ( object instanceof THREE.Mesh ) {
if ( object instanceof THREE.Mesh || object instanceof THREE.Line || object instanceof THREE.Sprite ) {
var bFound = false;
......@@ -249,6 +249,9 @@ THREE.OutlinePass.prototype = Object.assign( Object.create( THREE.Pass.prototype
// Make selected objects invisible
this.changeVisibilityOfSelectedObjects( false );
var bg = this.renderScene.background;
this.renderScene.background = null;
// 1. Draw Non Selected objects in the depth buffer
this.renderScene.overrideMaterial = this.depthMaterial;
renderer.render( this.renderScene, this.renderCamera, this.renderTargetDepthBuffer, true );
......@@ -269,6 +272,8 @@ THREE.OutlinePass.prototype = Object.assign( Object.create( THREE.Pass.prototype
this.renderScene.overrideMaterial = null;
this.changeVisibilityOfNonSelectedObjects( true );
this.renderScene.background = bg;
// 2. Downsample to Half resolution
this.quad.material = this.materialCopy;
this.copyUniforms[ "tDiffuse" ].value = this.renderTargetMaskBuffer.texture;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册