polygon selection

I’m aware of a method to continue benefiting from the hardware selector. At present, the hardware selector utilizes a process where cell indices are written into a texture (in simpler terms, a 2D array accessible on the GPU) that matches the dimensions of the render window. This setup confines the information that a shader can encode to just one cell per pixel.

An alternative approach exists: VTK can instruct the hardware selector to populate a Shader Storage Buffer Object (SSBO, a term understood in simple terms as a 1D array accessible on the GPU) with 1s or 0s. The size of this array would be equal to the number of cells. Zeroing this ssbo is so easy and fast. Readback of selected cells can be done with glMapBuffer. Each value of 1 would signify that a cell was selected, while a value of 0 would indicate that the cell wasn’t selected.

@dcthomp, @sankhesh, @cory.quammen what do you think?

1 Like