Просмотр исходного кода

Merge pull request #18849 from Mugen87/dev19

LineDashedMaterial: Avoid code duplication in vertex shader.
Mr.doob 5 лет назад
Родитель
Сommit
ecf1cab101
1 измененных файлов с 3 добавлено и 5 удалено
  1. 3 5
      src/renderers/shaders/ShaderLib/linedashed_vert.glsl.js

+ 3 - 5
src/renderers/shaders/ShaderLib/linedashed_vert.glsl.js

@@ -12,13 +12,11 @@ varying float vLineDistance;
 
 void main() {
 
-	#include <color_vertex>
-
 	vLineDistance = scale * lineDistance;
 
-	vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );
-	gl_Position = projectionMatrix * mvPosition;
-
+	#include <color_vertex>
+	#include <begin_vertex>
+	#include <project_vertex>
 	#include <logdepthbuf_vertex>
 	#include <clipping_planes_vertex>
 	#include <fog_vertex>