I have a situation, where I would like to hide some cells based on a custom array. I know that I add a custom array, threshold and a geometry but it is too slow. Meshes are very large.
I was thinking whether it was possible to access a custom array in a shader and just do a replacement shader with an early exit in the vertex shader.
I can use the vertex colors, scalarColor
in the shader, but I also need them for display. Is it possible to have both vertex and cell colors enabled (=available, but not used). Preferably, I would like to use the cell colors just for indexing (=flags). I plan on using it for an undo feature for some sculpting that I am investigating.
Ideally, I would like to expose a custom attributes that is not used for anything thing else than what I would use it for. Even better if the current polymapper can do this already. When I apply a LUT, the LUT the determines color - could it just change the opacity and keep the original color RGB values. That would also solve it.
I know I can subclass the vtkPolyDataMapper, but then I need to do WebGL, WebGPU also. Currently looking into the code and see if there is some buffer that I can abuse for the purpose.
Trying with a custom vertex buffer… Will figure out what the name is and how I address it.
Thanks in advance.