-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
state: blockedThis issue is blocked by another issueThis issue is blocked by another issuetype: enhancementNew feature or requestNew feature or request
Description
Problem
For GUI, we need a simple way to detect when the mouse hovers over a widget, even when the widget is rendered in a texture target that is rendered in the main window.
Feature
Add GPU picking functionality to the graphics module.
Dependencies
Additional context
Multiple parameters can be used to optimize the rendering (not all needs to be implemented for the moment):
- Reduce the framerate (for example main rendering is done at 60FPS and picking rendering at 10FPS)
- Reduce the resolution (for example, picking buffer is 4x smaller than window buffer)
- Don't render if not necessary (e.g. when mouse is not moving)
- It's important that the picking is done before the rendering, and the result retrieval from the GPU is done after the full rendering, so that it let some time to the GPU to render the picking texture.
To identify uniquely the objects, we can use the entity ID. There are few solutions that could be applied:
- The entity ID is converted to a RGB color, and this color is used to render the object in the picking texture.
- The picking texture have format R32Uint, which corresponds to the entity ID. This approach is probably more recommended as entity ID conversion is simpler and render might be quicker.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
state: blockedThis issue is blocked by another issueThis issue is blocked by another issuetype: enhancementNew feature or requestNew feature or request