I’m trying to do something like a dynamic volume imposter (from NV SDK). Right now, I’m using a GF FX 5800. Unfortunately, RenderTexture doesn’t let you bind a 3D texture target (yet), so the only option is to use CopyTexSubImage3D.
The fastest I’ve gotten it to run is about 3 Hz by rendering a bunch of slices (16 256x256 slices) into a single PBuffer and then copying each chunk into a different slice of the volume texture. That’s pretty bad considering the same scene (a textured glut teapot) can go ~100 Hz at a resolution higher than 256x256. Anyone know how to do this faster?
The texture internal format should match the frame buffer. Experiment with diff formats.
Yeah, everything is RGBA 32bits. I could probably try 16-bits, but it doesn’t seem like the actual bandwidth used by copybuffers slows things down terribly much (at least, it’s not the only thing). For example, rendering 16 slices at 512x512 is twice as fast as rendering 64 slices at 256x256 (same number of pixels). I’m guessing that rendering a single slice at 2048x2048 would be fastest.
The other thing I was going to try was rendering to the backbuffer instead of a pbuffer. This would avoid one context switch per frame.
Another thing I was going to try was “double buffering” the 3d texture. Maybe the copybuffers were forcing some kind of synchronization within the driver because it is used in the other on-screen context.
Anyone have luck with any of these approaches? Any vendors out there willing to give some specific advice?