While trying to improve our volume rendering quality and increase the rendering speed (specially on older GPUs) I have added a gradient texture (instead of computing it in the shader). The gradient texture is computed more correctly and is smoothed to give better visual result.
I’m using a double buffer 3D texture and added a second thread that is shared with the main rendering thread and it update the “back” texture.
This works but causes “hiccups” in the main rendering thread when the volume is being updated, these hiccups are not caused because of any wait in my application but are in the driver.
Reducing the size of the volume eliminate the problem, also the updater thread calls glFinish to make sure the data is uploaded completely and only then signal the main thread.
We are using at least 4 contexts and they are all shared.
Do you know why this is happening?
Is there an internal copy between the shared context?
Any suggestion on fixing it?
Texture size: 256^3 - RGBA unsigned byte.
Cpu: Intel Quad core extreme.
GPU1: Nvidia Quadro4600 (G80)
GPU2: Nvidia GTX 260
Windows XP 32Bit
Any help appreciated,