Skip to content

Conversation

mrdoob
Copy link
Owner

@mrdoob mrdoob commented May 13, 2025

Description

Was tinkering a bit with the example and ended up with something more interesting looking/behaving and texture-less.

Screen.Recording.2025-05-13.at.8.08.53.PM.mov

@mrdoob mrdoob added this to the r177 milestone May 13, 2025
…rt, function or class

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@sunag sunag closed this May 13, 2025
@sunag sunag reopened this May 13, 2025
@sunag
Copy link
Collaborator

sunag commented May 13, 2025

Great improvement.
What do you think about switching to Sprite instead of Mesh?

const particles = new THREE.Sprite( material );
particles.count = particleCount;
particles.frustumCulled = false;
scene.add( particles );

@mrdoob
Copy link
Owner Author

mrdoob commented May 14, 2025

@sunag Done!

@mrdoob mrdoob merged commit e04f92e into dev May 14, 2025
10 of 11 checks passed
@mrdoob mrdoob deleted the compute branch May 14, 2025 07:25
@adrianooo30
Copy link

I hate my mind.

@mrdoob
Copy link
Owner Author

mrdoob commented May 16, 2025

@sunag Was trying to set material.alphaToCoverage = true to get antialias in the alphaTestNode but doesn't seem to be working. Should it be working?

@sunag
Copy link
Collaborator

sunag commented May 17, 2025

I added shapeCircle() in the user's intention can add other kind of shapes #30300 it is compatible with alphaToCoverage.

const material = new THREE.SpriteNodeMaterial();
material.colorNode = uv().mul( colors.element( instanceIndex ) );
material.positionNode = positions.toAttribute();
material.scaleNode = size;
material.opacityNode = shapeCircle();
material.alphaToCoverage = true;
material.transparent = true;

RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
* Improved webgpu_compute_particles example.

* Indentation fix.

* Indentation fix.

* Potential fix for code scanning alert no. 3517: Unused variable, import, function or class

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Sprite instead of Mesh.

* Clean up.

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
* Improved webgpu_compute_particles example.

* Indentation fix.

* Indentation fix.

* Potential fix for code scanning alert no. 3517: Unused variable, import, function or class

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Sprite instead of Mesh.

* Clean up.

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
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.

3 participants