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

Small gsplat shader update #7186

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

slimbuck
Copy link
Member

@slimbuck slimbuck commented Dec 9, 2024

This PR changes the default gsplat shader to refrain from clipping gaussians by the near and far camera clipping planes. Depth values are clamped instead.

Copy link
Contributor

@willeastcott willeastcott left a comment

Choose a reason for hiding this comment

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

Personally can't think of why this would cause any problems...let's see how it goes. 😄

vec4 splat_proj = matrix_projection * splat_cam;

// ensure gaussians are not clipped by camera near and far
splat_proj.z = clamp(splat_proj.z, -abs(splat_proj.w), abs(splat_proj.w));
Copy link
Contributor

Choose a reason for hiding this comment

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

it feels incorrect to not clip them by the far camera.

@slimbuck slimbuck merged commit ed891bb into playcanvas:main_v1 Dec 9, 2024
8 checks passed
@slimbuck slimbuck deleted the gsplat-shader-v1-dev branch December 9, 2024 11:48
slimbuck added a commit to slimbuck/engine that referenced this pull request Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants