Skip to content

improve picking performance and memory footprint

Ken Martin requested to merge ken-martin/vtk:improve_picking_performance into master

Significant rework of the hardware picking code.

Previously each mapper had to make sure that the rendered colors were correct for point/cell etc ID during hardware picking and this required large datastructures and texture uploads to the GPU on each pick.

Now it collects the color buffers and gives the mappers a chance to update them. This allows us to use gl_VertexId and gl_PrimitiveId directly in the shader and then if picked, allow the mapper to adjust the color buffer as needed. This allows us to avoid rebuilding the VBO and textures each time and avoids the memory footprint related to that.

This topic could be optimized to perform the color buffer processing faster in many ways. One simple way would be to have the hardware selector keep track of min/max X,Y for each actor when it computes the hitprops list and then send that down to the processing pass so that the processing loops only run on that X,Y rectangle.

Merge request reports