Explorar o código

point size attenuation fix

omgitsraven %!s(int64=9) %!d(string=hai) anos
pai
achega
cede75c531
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;