浏览代码

point size attenuation fix

omgitsraven 9 年之前
父节点
当前提交
cede75c531
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;