PDA

View Full Version : Benchmarks on CopySubTexImage vs RenderToTexture-



V
04-02-2001, 01:45 PM
After recently complaining to Matt Craighead on this forum about OpenGL's absent but oft-rumored "Render-To-Texture" extension, i ran some benchmarks comparing GL's glCopyTexSubImage2D vs DX8's SetRenderTarget.

Using both our D3D and GL graphics engines, i benchmarked the FPS in a room with 12 curved mirrors and 20 spinning teapots (~10k triangles total). Each mirror used its own rendered-on-the-fly texture at 512x512.

Test machines were the *same* (768meg, 1ghz P3). I used a GeForce2GTS and Radeon64DDR with the latest public drivers. Both the GL and DX demos scored roughly the same frame-rate.

Average Framerates at 640x480
GL DX8
------------------
GeForce 31.4 29.8
Radeon 19.4 24.3

GL was higher on GeForce and DX was higher on Radeon. No GL extensions were used and the vertex buffers for DX8 were updated each frame so as to pair evenly with GL's per frame vertex array.

Considering that a 512x512 RGBA 32bit texture is exactly 1meg, and the _internal_ bandwidth of this generation of video cards is rather enormous (memory clock * bandwidth >= several gig, ex 200mhz SDR * 128bits = 6.4gig ), it is reasonable to assume that the overhead of the copying in CopySubTexImage is actually minimal. (Minimal when compared to serious bottlenecks such as the AGP issues of moving your verts to the card)-

Anyways, thought this may be of use to those who ponder/question DX8 render-to-texture advantages-

Tom Nuydens
04-02-2001, 11:48 PM
Interesting! For your GeForce2, when you say "latest public drivers", do you mean the 10.xx series or the official 6.xx drivers? glCopyTexSubImage2D() was allegedly optimized in the 10.xx drivers, and I'm curious about how much of a difference this made.

- Tom

V
04-03-2001, 05:37 AM
the 10.xx drivers...

stecher
04-03-2001, 06:56 AM
Awsome!!!!!! Thank you V. Now I can sleep again.

Kind of off topic, but is there a way to get the 10.xx drivers without being a registered nvidia developer?

MikeC
04-03-2001, 07:38 AM
Was this rendering the texture images into the backbuffer, or somewhere else?

V
04-03-2001, 07:42 AM
32bit Backbuffer for GL, individual RenderTargets for DX8-

Tom Nuydens
04-04-2001, 12:27 AM
This just struck me: how did you glCopyTexImage2D() a 512x512 texture if you were running in 640x480? Didn't you get a 32-pixel black border where your texture hit the edge of the window/screen?

- Tom

Lord crc
04-04-2001, 01:11 AM
www.geforcefaq.com (http://www.geforcefaq.com) is one place to get drivers

V
04-04-2001, 05:05 AM
Oops, right you are Tom. I changed to 800x600, not 650x480 to use the 512x512s.