File tree Expand file tree Collapse file tree 4 files changed +26
-5
lines changed
Expand file tree Collapse file tree 4 files changed +26
-5
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,10 @@ export class DepthComparisonMaterial extends ShaderMaterial {
3434 vertexShader : vertex ,
3535
3636 depthWrite : false ,
37- depthTest : false
37+ depthTest : false ,
38+
39+ morphTargets : true ,
40+ skinning : true
3841
3942 } ) ;
4043
Original file line number Diff line number Diff line change 11#include < packing>
2+ #include < clipping_planes_pars_fragment>
23
34uniform sampler2D tDepth;
45uniform float cameraNear;
@@ -9,6 +10,8 @@ varying vec4 vProjTexCoord;
910
1011void main() {
1112
13+ #include < clipping_planes_fragment>
14+
1215 // Transform into Cartesian coordinate (not mirrored).
1316 vec2 projTexCoord = (vProjTexCoord.xy / vProjTexCoord.w) * 0.5 + 0.5 ;
1417 projTexCoord = clamp (projTexCoord, 0.002 , 0.998 );
Original file line number Diff line number Diff line change 1+ #include < common>
2+ #include < morphtarget_pars_vertex>
3+ #include < skinning_pars_vertex>
4+ #include < clipping_planes_pars_vertex>
5+
16varying float vViewZ;
27varying vec4 vProjTexCoord;
38
49void main() {
510
6- vec4 mvPosition = modelViewMatrix * vec4 (position, 1.0 );
7- vProjTexCoord = projectionMatrix * mvPosition;
11+ #include < skinbase_vertex>
12+
13+ #include < begin_vertex>
14+ #include < morphtarget_vertex>
15+ #include < skinning_vertex>
16+ #include < project_vertex>
17+
818 vViewZ = mvPosition.z;
19+ vProjTexCoord = gl_Position ;
920
10- gl_Position = vProjTexCoord;
21+ #include < clipping_planes_vertex >
1122
1223}
Original file line number Diff line number Diff line change @@ -134,7 +134,11 @@ export class OutlinePass extends Pass {
134134 */
135135
136136 this . renderPassDepth = new RenderPass ( this . mainScene , this . mainCamera , {
137- overrideMaterial : new MeshDepthMaterial ( { depthPacking : RGBADepthPacking } ) ,
137+ overrideMaterial : new MeshDepthMaterial ( {
138+ depthPacking : RGBADepthPacking ,
139+ morphTargets : true ,
140+ skinning : true
141+ } ) ,
138142 clearColor : new Color ( 0xffffff ) ,
139143 clearAlpha : 1.0
140144 } ) ;
You can’t perform that action at this time.
0 commit comments