Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPGPU Protoplanets example: fix pixel trails #21510

Merged
merged 1 commit into from
Mar 25, 2021
Merged

GPGPU Protoplanets example: fix pixel trails #21510

merged 1 commit into from
Mar 25, 2021

Conversation

yomboprime
Copy link
Collaborator

Related issue: -

Description

The GPGPU Protoplanets example vertex shader used to set GLPointSize to 0 so that collided particles don't show anymore.

It seems something changed in WebGL or in a lower software layer, that now makes particles with GLPointSize set to 0 visible as 1-pixel dots (enlarge the image to see the individual pixels):

imagen

This PR fixes it with a small change that discards the particle in the fragment shader if it has 0 mass:

imagen

@mrdoob
Copy link
Owner

mrdoob commented Mar 25, 2021

Interesting...

@mrdoob mrdoob added this to the r127 milestone Mar 25, 2021
@mrdoob mrdoob merged commit a671f41 into mrdoob:dev Mar 25, 2021
@mrdoob
Copy link
Owner

mrdoob commented Mar 25, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants