Skip to content

[Fix] Gaussian splatting GPU picker exclude inactive parts#18090

Draft
spsDrop wants to merge 3 commits intoBabylonJS:masterfrom
spsDrop:fix/gs-gpu-picking-hide-non-active-parts
Draft

[Fix] Gaussian splatting GPU picker exclude inactive parts#18090
spsDrop wants to merge 3 commits intoBabylonJS:masterfrom
spsDrop:fix/gs-gpu-picking-hide-non-active-parts

Conversation

@spsDrop
Copy link
Contributor

@spsDrop spsDrop commented Mar 13, 2026

Gaussian splatting GPU picker compound meshes hide non-visible and non-pickable parts

@CedricGuillemet
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 13, 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
Collaborator

bjsplat commented Mar 13, 2026

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

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

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

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18090/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/18090/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/18090/merge
https://gui.babylonjs.com/?snapshot=refs/pull/18090/merge
https://nme.babylonjs.com/?snapshot=refs/pull/18090/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/18090/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
Collaborator

bjsplat commented Mar 13, 2026

varying float vPartIndex;
#if IS_COMPOUND
uniform vec3 partPickingColors[${this._maxPartCount}];
uniform float partActive[${this._maxPartCount}];
Copy link
Contributor

Choose a reason for hiding this comment

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

You can group both uniform in a single vec4. Some devices have a very limited number of possible uniforms. Also, this will need to be updated for worst case scenario :

export function GetGaussianSplattingMaxPartCount(engine: AbstractEngine): number {

Copy link
Contributor

Choose a reason for hiding this comment

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

Or, is it possible to merge usage of partActive and partVisibility and have a single uniform for both?

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 13, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 13, 2026

@CedricGuillemet
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 13, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 13, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 13, 2026

@CedricGuillemet
Copy link
Contributor

@spsDrop I'm testing this PG : https://playground.babylonjs.com/?snapshot=refs/pull/18090/merge#3LNCE6#36 and I can't pick any GS. Am I missing something?

@sebavan sebavan marked this pull request as draft March 17, 2026 16:08
@spsDrop
Copy link
Contributor Author

spsDrop commented Mar 18, 2026

@CedricGuillemet Looks like I had committed a version with the wrong shader code. It's fixed now I also caught a bug where non-compound meshes wouldn't be excluded based on visibility or isPickable, and fixed it.

@CedricGuillemet
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 19, 2026

Reviewer - this PR has made changes to one or more package.json files.

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 19, 2026

Reviewer - this PR has made changes to the build configuration file.

This build will release a new package on npm

If that was unintentional please make sure to revert those changes or close this PR.

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 19, 2026

Copy link
Contributor

@CedricGuillemet CedricGuillemet left a comment

Choose a reason for hiding this comment

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

LGTM! PG works fine

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 19, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Mar 19, 2026

@CedricGuillemet
Copy link
Contributor

@spsDrop ready to merge if you're done.

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