Browse Source

Clipping support

WestLangley 7 năm trước cách đây
mục cha
commit
d27bdc1dc6
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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>