Quellcode durchsuchen

point size attenuation fix

omgitsraven vor 10 Jahren
Ursprung
Commit
0baa0ed0b0
1 geänderte Dateien mit 1 neuen und 2 gelöschten Zeilen
  1. 1 2
      examples/webgl_custom_attributes_points2.html

+ 1 - 2
examples/webgl_custom_attributes_points2.html

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

粤ICP备19079148号