Browse Source

point size attenuation fix

omgitsraven 9 năm trước cách đây
mục cha
commit
cede75c531
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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;