Skip to content

How can I remove and crop splats? #306

Answered by mkkellogg
gcampini asked this question in Q&A
Discussion options

You must be logged in to vote

For (1), you could conceivably pass 2 three-element vectors corresponding to the bounding box minimum and maximum as uniforms to the shader for SplatMesh and use those values to determine which splats to make visible. You could add the uniforms here:

uniform int sceneCount;

It might look like:

   uniform vec3 min;
   uniform vec3 max;

Then you can add logic to determine if the splat is in the bounding box by using the value of splatCenter before this line:

vec4 viewCenter = transformModelViewMatrix * vec4(splatCenter, 1.0);

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by gcampini
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants