浏览代码

GPGPU Protoplanets example: fix pixel trails (#21510)

Juan Jose Luna Espinosa 4 年之前
父节点
当前提交
a671f4109b
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      examples/webgl_gpgpu_protoplanet.html

+ 2 - 0
examples/webgl_gpgpu_protoplanet.html

@@ -221,6 +221,8 @@
 
 			void main() {
 
+				if ( vColor.y == 0.0 ) discard;
+
 				float f = length( gl_PointCoord - vec2( 0.5, 0.5 ) );
 				if ( f > 0.5 ) {
 					discard;