Parcourir la source

point size attenuation fix

omgitsraven il y a 10 ans
Parent
commit
cede75c531
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      examples/webgl_custom_attributes_points3.html

+ 1 - 1
examples/webgl_custom_attributes_points3.html

@@ -49,7 +49,7 @@
 
 				vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );
 
-				gl_PointSize = size * ( 150.0 / length( mvPosition.xyz ) );
+				gl_PointSize = size * ( 150.0 / -mvPosition.z );
 
 				gl_Position = projectionMatrix * mvPosition;