mikegi

12-27-2003, 05:14 PM

Here's my problem: I'm drawing a radar display and need a fast & small way to smooth the display. My data is in the form of ~360 radials, each one covering roughly one degree, with up to 920 samples per radial. A complete set of radials is called a sweep.

Right now I walk the samples for each radial pair drawing 1d textured triangle strips (1d so that I get color contouring) between them. Unfortunately, this requires huge vertex arrays -- one typical sweep needed 708,000 vertices and produced a 13MB display list. It produced beautiful output and was very fast ( <30ms on a P4-2.26GHz with ATI 9200 GPU ) but the memory usage is a killer considering I want to be able to loop through 20 sweeps. It also took over half a second to compile the display list. Immediate mode draws in around 70ms and has the benefit of no extra memory required.

Anyway, I need to reduce the triangle count. I'd like to come up with some scheme to use multitexturing/pixel shaders/etc. so that I only need to use one triangle per radial. Is there a way to overcome the polar distortion using multitexturing and/or pixel shaders?

Would it be possible to lerp between two 1d textures (representing the left and right sides of the radial triangle) using a pixel shader? I don't know much about PS so I don't know how much of the triangle geometry info is available at shading time.

I'd prefer to come up with a multipass/multitexturing solution. There has to be a way to undo the texture mapping coordinate distortion. I want the 2d texture coordinates on the left side of my radial triangle to go from 0,0 to 1,0 and the right side to go from 0,1 to 1,1 with bilinear interpolation in between.

Anyone have any ideas??? Thanks.

Right now I walk the samples for each radial pair drawing 1d textured triangle strips (1d so that I get color contouring) between them. Unfortunately, this requires huge vertex arrays -- one typical sweep needed 708,000 vertices and produced a 13MB display list. It produced beautiful output and was very fast ( <30ms on a P4-2.26GHz with ATI 9200 GPU ) but the memory usage is a killer considering I want to be able to loop through 20 sweeps. It also took over half a second to compile the display list. Immediate mode draws in around 70ms and has the benefit of no extra memory required.

Anyway, I need to reduce the triangle count. I'd like to come up with some scheme to use multitexturing/pixel shaders/etc. so that I only need to use one triangle per radial. Is there a way to overcome the polar distortion using multitexturing and/or pixel shaders?

Would it be possible to lerp between two 1d textures (representing the left and right sides of the radial triangle) using a pixel shader? I don't know much about PS so I don't know how much of the triangle geometry info is available at shading time.

I'd prefer to come up with a multipass/multitexturing solution. There has to be a way to undo the texture mapping coordinate distortion. I want the 2d texture coordinates on the left side of my radial triangle to go from 0,0 to 1,0 and the right side to go from 0,1 to 1,1 with bilinear interpolation in between.

Anyone have any ideas??? Thanks.