Browse Source

point size attenuation fix

omgitsraven 9 years ago
parent
commit
ec3c380a00
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/webgl_buffergeometry_custom_attributes_particles.html

+ 1 - 1
examples/webgl_buffergeometry_custom_attributes_particles.html

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