Skip to content

Adds GPU particles visual tests#18232

Merged
VicenteCartas merged 8 commits intoBabylonJS:masterfrom
VicenteCartas:cpu-gpu
Apr 7, 2026
Merged

Adds GPU particles visual tests#18232
VicenteCartas merged 8 commits intoBabylonJS:masterfrom
VicenteCartas:cpu-gpu

Conversation

@VicenteCartas
Copy link
Copy Markdown
Contributor

This PR adds GPU particles visual tests for all currently supported features. This is the first step to have a baseline so when implementing new GPU features we guarantee we are not regressing existing functionality.

It also fixes a small bug on directed cone emitter for GPU particles.

Copilot AI review requested due to automatic review settings April 3, 2026 02:12
@VicenteCartas VicenteCartas enabled auto-merge (squash) April 3, 2026 02:14
@VicenteCartas VicenteCartas changed the title Adds GPU visual tests Adds GPU particles visual tests Apr 3, 2026
@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 3, 2026

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR establishes an initial visual-test baseline for GPU particle system features (via Playground snapshots) and fixes GPU uniform binding for the directed cone emitter so GPU particles render correctly.

Changes:

  • Added GPU particles visual test entries to the visualization test config.json (Playground IDs + reference images, WebGL1 excluded).
  • Added new PNG reference images for GPU particles visualization baselines.
  • Fixed ConeDirectedParticleEmitter GPU uniform setup by delegating to ConeParticleEmitter’s shader/UBO bindings.

Reviewed changes

Copilot reviewed 2 out of 39 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/tools/tests/test/visualization/config.json Registers a suite of GPU particles visual tests (Playground + baseline image mapping).
packages/dev/core/src/Particles/EmitterTypes/coneParticleEmitter.ts Fixes directed cone GPU uniforms/UBO layout by calling super.*, aligning with the base emitter’s radius/height float2 packing and other cone uniforms.
packages/tools/tests/test/visualization/ReferenceImages/gpu-particles-multiply-blend.png Adds baseline image for multiply blend GPU particles test.
packages/tools/tests/test/visualization/ReferenceImages/gpu-particles-basic-translation-pivot.png Adds baseline image for translation pivot GPU particles test.
packages/tools/tests/test/visualization/ReferenceImages/gpu-particles-basic-size.png Adds baseline image for size GPU particles test.
packages/tools/tests/test/visualization/ReferenceImages/gpu-particles-basic-lifetime.png Adds baseline image for lifetime GPU particles test.

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 3, 2026

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 3, 2026

Snapshot stored with reference name:
refs/pull/18232/merge

Test environment:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18232/merge/index.html

To test a playground add it to the URL, for example:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18232/merge/index.html#WGZLGJ#4600

Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves):

https://playground.babylonjs.com/?snapshot=refs/pull/18232/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/18232/merge
https://gui.babylonjs.com/?snapshot=refs/pull/18232/merge
https://nme.babylonjs.com/?snapshot=refs/pull/18232/merge

To test the snapshot in the playground with a playground ID add it after the snapshot query string:

https://playground.babylonjs.com/?snapshot=refs/pull/18232/merge#BCU1XR#0

If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools.

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 3, 2026

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 3, 2026

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Apr 3, 2026

@VicenteCartas VicenteCartas merged commit 9a60673 into BabylonJS:master Apr 7, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants