Bläddra i källkod

Merge pull request #13999 from WestLangley/dev-fat_line_clipping

Fat Lines: clipping support
Mr.doob 7 år sedan
förälder
incheckning
7ed51314b4
1 ändrade filer med 2 tillägg och 2 borttagningar
  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>