Browse Source

Clipping support

WestLangley 7 years ago
parent
commit
d27bdc1dc6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      examples/js/lines/LineMaterial.js

+ 2 - 2
examples/js/lines/LineMaterial.js

@@ -168,9 +168,9 @@ THREE.ShaderLib[ 'line' ] = {
 
 			gl_Position = clip;
 
-			#include <logdepthbuf_vertex>
+			vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation
 
-			#include <worldpos_vertex>
+			#include <logdepthbuf_vertex>
 			#include <clipping_planes_vertex>
 			#include <fog_vertex>