I've got an opengl question, figured there are a few experts on this list.  I'm generating a 3D volume render using 3d textures and would like to setup multiple regions of interest (ROIs) where only the volume data within the ROI is displayed (everything else is transparent).  This is rather easy using the clipping planes for rectangular shaped ROI's and can be faked for ellipsoidal ROIs with the stenil buffer.  The tricky part is to render multiple ROI's simultaneously without much performance hit.  I'm having a hardtime doing this elegantly.  Some ideas are:
  1. Clip the actual 3d texture to the different ROI's using a binary mask and reload the texture to the GPU.  This becomes problematic for non-rectangular ROIs as the ROIs will look "voxelated" but is nice because it is a single pass for all rendering all ROIs.
  2. For each ROI, render the 3d texture clipped with that ROI's bounds. This require multiple renderings and would slow down quite a bit for many ROI's, this will look the best but is not all that elegant.
  3. Use a shader to clip the ROI's
Any other obvious solutions or ticks that would do this?  Any help is much appreciated.