Module re_renderer::draw_phases::picking_layer
source · Expand description
GPU driven picking.
This module provides the PickingLayerProcessor
which is responsible for rendering & processing the picking layer.
Picking is done in a separate pass to a as-small-as needed render target (size is user configurable).
The picking layer is a RGBA texture with 32bit per channel, the red & green channel are used for the PickingLayerObjectId
,
the blue & alpha channel are used for the PickingLayerInstanceId
.
(Keep in mind that GPUs are little endian, so R will have the lower bytes and G the higher ones)
In order to accomplish small render targets, the projection matrix is cropped to only render the area of interest.
Structs§
- Utility for copying a depth texture when it can’t be read-back directly to a [
wgpu::TextureFormat::R32Float
] which is readable texture. - Combination of
PickingLayerObjectId
andPickingLayerInstanceId
. - The second 64bit of the picking layer.
- The first 64bit of the picking layer.
- Manages the rendering of the picking layer pass, its render targets & readback buffer.
- GPU retrieved & processed picking data result.
- Type used as user data on the gpu readback belt.