Open
Description
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