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

LineSegments2: Fix raycast() . #30016

Merged
merged 3 commits into from
Dec 4, 2024
Merged

LineSegments2: Fix raycast() . #30016

merged 3 commits into from
Dec 4, 2024

Conversation

Samsy
Copy link
Contributor

@Samsy Samsy commented Dec 2, 2024

Fixed #29986

Description

Fixed raycasting for the LineSegments2 for WebGPU

FIx codescan issue.
@Mugen87 Mugen87 changed the title updated linesegments2 webgpu LineSegments2: Fix raycast() . Dec 2, 2024
@Mugen87 Mugen87 added this to the r172 milestone Dec 2, 2024
@RenaudRohlinger
Copy link
Collaborator

This won't work, getViewport returns a vec4 and the resolution is on zw.

@RenaudRohlinger
Copy link
Collaborator

All good! I will add an example too. Thanks!

@RenaudRohlinger RenaudRohlinger merged commit ad0ff80 into mrdoob:dev Dec 4, 2024
11 checks passed
@Samsy
Copy link
Contributor Author

Samsy commented Dec 12, 2024

@RenaudRohlinger
Actually, discovered another problem, you cannot raycast lines that are not visible in the first hand, like a ghost geometry, since the resolution is only updated on the onBefore etc, which then need to set the resolution manually, I'm not sure if there is a general solution for this, or going by hand is the way we want it

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.

Raycast on a WebGPU Line2 / Line2NodeMaterial breaks
3 participants