소스 검색

point size attenuation fix

omgitsraven 10 년 전
부모
커밋
ec3c380a00
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;