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

Voxel artifacts when camera direction is parallel to clipping angle #11004

Open
lilleyse opened this issue Jan 4, 2023 · 0 comments
Open

Voxel artifacts when camera direction is parallel to clipping angle #11004

lilleyse opened this issue Jan 4, 2023 · 0 comments

Comments

@lilleyse
Copy link
Contributor

lilleyse commented Jan 4, 2023

When the camera direction is parallel to any of the clipping angles the shape intersection code in the shader breaks down. This was fixed for cylinder wedges less than 180 degrees in 48d4790 and would require a similar but slightly more complicated fix in intersectRegularWedge. I only tested this for cylinders, but it's possible that other shapes that do half-space or plane intersection will have similar issues. In general the intersection code does not robustly handle cases where the ray origin is on the plane, parallel to the plane, or both.

In the gif below, notice how moving the camera fixes the problem. That is because the camera is no longer on the plane.

screen-space-clipping

Sandcastle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment