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

Feature Proposal: PointerNode #29793

Open
RenaudRohlinger opened this issue Nov 3, 2024 · 1 comment
Open

Feature Proposal: PointerNode #29793

RenaudRohlinger opened this issue Nov 3, 2024 · 1 comment

Comments

@RenaudRohlinger
Copy link
Collaborator

RenaudRohlinger commented Nov 3, 2024

Description

Can we consider adding a PointerNode, similar to ScreenNode, to make a pointer node accessible in both compute and render shaders?

This could simplify and optimize pointer-based interactions and we could potentially offer built-in raycasting support as an option.

The webgpu_compute_geometry.html example would be a great use case to test and demonstrate this feature.

Potential API:

pointer = // normalized
pointerViewport = // pixels


// potential API
pointer(sceneToRaycast)

pointer.xy // coordinates
pointer.z // depth of intersection
pointer.w.greaterThan(0) // raycast is hitting

/cc @sunag @Mugen87

@sunag
Copy link
Collaborator

sunag commented Nov 4, 2024

I think in this sense it is worth investing in a GPU-based Raycaster. In pointer(). Maybe we could have names as a shortcut, for example pointer.pressed instead of pointer.w.greaterThan(0).

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

No branches or pull requests

3 participants