Archived

This topic is now archived and is closed to further replies.

The C modest god

3D graphics cards VS software rendering

Recommended Posts

I am wondering how much fast 3D graphics are. I have done a flat shaded rendering program and rendered a 1400 triangles object (with about half visible) at 40 fps on my 1GHz pentium 3. It would seem that my GFORCE3 would render it much faster then my 1GHz pentium. I assume that basically the GFORCE3 card have a prossecor unit much slower then 1GHz pentium. Does GFORCE3 being specific makes it able to render 3D faster then 1GHz pentium? What do you think?

Share this post


Link to post
Share on other sites
..............your pentium is a cpu(central processing unit), not a gpu(grapohics processing unit), so your pentium is NOT procuding any graphics, your graphics card is. other than that, im completely stupid when it comes to software modes, so if thats what you mean ill step aside and let someone whoi knows about them help you.

Share this post


Link to post
Share on other sites
Hardware renderers are faster for several reasons. First, and most importantly, a CPU has to do its math as a series of instructions (add, multiply, copy data in memory, etc.), while a hardware renderer can implement a lot of math operations on a single circuit (dot product, for example). Secondly, and also very important, hardware renderers do multiple calculations at once (parallelism), which means they can be faster by a factor of 3-4 on average. It also helps a lot that conditionals (if statements) are a lot faster in hardware than in software, because on a CPU a conditional can take hundreds of cycles to process, whereas in hardware an "if" is as simple as controlling which circuit gets the signal; in hardware, an "if" is basically free (not counting the cost of greater-than tests, or whatever).

There''s also the fact that hardware does not have to do anything but graphics. Your CPU has to run your OS, other programs, etc. at the same time as it is rendering. Finally, hardware renderers are very finely tuned to use the best and fastest algorithms possible. Chances are your software engine is not nearly as optimized as a hardware renderer.

A lot of other little things are different, but the biggest differences come from the reasons I''ve listed here.

Share this post


Link to post
Share on other sites
Firstly, I think that you should use a spell checker of some sort (no offense).

Specialized rendering hardware always does the job very fast compared to software renderers. You say you have rendered a 1400 polygon flat shaded object at 40 FPS with your software renderer, but a GeForce could probably render a 100000 polygon object at 100 FPS, that is with bilinear filtered texturing of course.

There is the fact that your pentium 3 processor is not dedicated to graphics, it also has to run your operating system and various other processes. A hardware renderer does not have to run anything else than graphics, it can process many tasks in parallel, perform specialized math operations much faster than a CPU could... It also has very fast memory dedicated to it.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If you make a software render, its NOT accelerated by GPU, is executed in CPU, only if you use Opengl or direct3d to do your render, you use the GPU, if not, you only get advantage of the GPU bus,AGP, ...

Share this post


Link to post
Share on other sites
quote:
Original post by ApochPiQ
... on a CPU a conditional can take hundreds of cycles to process ...


Current Branch prediction techniques are very sophisticated and getting around 97-98% prediciton correct is a good estimate for a processor like a p4. The if statements don''t contribute as much to the rendering process as you believe, because it is feasible to reduce a lot of the branch statements, if you so wanted on a software render.

Also, the OS doesn''t contribute as much as you''d think either. The main reason CPUs are slower than GPUs (probably around 60-70% of the reason) is the dedicated hardware in GPUs. For example, doing a dot product can be done in one or two steps, and there is no setup time, like in SSE. Also, the GPU has a cache specifically optimized for rasterization, unlike a CPU.

LinaInverse

Share this post


Link to post
Share on other sites
Generally graphic card memory has much more bandwidth.

Also, graphic shaders are small and so are always in cache.

Also, GPU''s have a specific cache just for texture reads.

Also, its much easier to pipeline a GPU. They are inherently designed to work in stages, and these stages have thier own hardware. Hardware can run truly in parallel, however a CPU can only do minor pipelining, comparatively.

Also, if you run 1 instuction every clock vs running 1 instruction every 5 clocks, you can get away with 1/5 the clock speed for the same instruction/second. therefore, your 1Ghz cpu doesnt indicate being faster just because the clock is faster.

Share this post


Link to post
Share on other sites
16 units executing a 4-way SIMD FP instruction every cycle, 32 fragments combined with the framebuffer every cycle (Z-compare/stencil-test/blending/etc), 8 textures being sampled per cycle with on the fly texture filtering (that is a biggy). Of course there is setup and perspective correct interpolation of per fragment shading parameters too.

What a GPU does in 1 cycle would take a CPU 100's of cycles, even ignoring the bandwith problems.

[edited by - PinkyAndThaBrain on October 7, 2003 2:56:13 PM]

Share this post


Link to post
Share on other sites