13
\$\begingroup\$

As opposed to CPU or software rendering I assume?

Wouldn't generally all current rendering be GPU based, seeing as you would be using OpenGL or Direct X?

Could someone give me some info here, can't find any suitable answers?

\$\endgroup\$
7
\$\begingroup\$

As you clearly already know what GPU rendering is... let me answer what you seem to be asking.

Traditionally, hardware rendering has carried a stigma of being very complex. This has in large part been due to the design of the application programming interfaces (APIs) which have not been well-geared to concealing complexity; that is, the learning curve has been steep. It has also been in part due to an understanding that writing 3D applications -- for which these APIs are heavily geared -- is far more complex than writing 2D ones. Re interface complexity, I'm referring to interfaces like OpenGL and DirectX. Re 3D vs 2D, I'm referring to the mathematics and geometry which goes into constructing 3D scenes, vs. the simplicity with which the untrained mind can approach 2D problems.

However, in recent years, not only has learning material become much more available, but also, many libraries that wrap the underlying complexities of these interfaces have become available and have lowered the barriers to entry. All of this has fed back into a cycle of increased interest which was already present due to the increasing importance of visualisation, slick user interfaces, and performance on low-powered devices.

So software rendering and 2D rendering have been good entry points and focus areas for those who were new to graphics and / or wanted to create a product where rendering did not take too much of the available time on a project. At least in regards to 2D, this still applies; technology has largely covered the gap in bringing 2D rendering to GPU.

\$\endgroup\$
19
\$\begingroup\$

There are some really good answers here, so just to supplement them.

A major driving force behind software rendering is capability. This was touched on in one of the answers, but I'm going to make an opposing point: software rendering can actually be more capable than hardware rendering, not less.

With hardware you're generally limited to the capabilities of the hardware itself, although OpenGL for one is capable of software-emulation of a lot of things that may not exist in hardware. What that means is that if you try to use Feature X but the hardware doesn't support it, one of two things will happen: either you'll drop back to software emulation (the typical OpenGL scenario) or you don't get to use it at all (the typical D3D scenario).

With software rendering you get to write the code yourself. You get to manipulate things and have full control over what happens down to the pixel level. To give an example of a blast from the past, Quake had pixel shaders implemented in software back in 1996, at a time when 3D cards (they weren't called "GPUs" then) could barely rasterize a few dozen textured triangles.

This is more the case with current GPUs too, but there are still significant parts of the graphics pipeline that are exposed as fixed functionality (or not even exposed at all).

Software rendering can scale out better. It's only relatively recent that we've seen multi-GPU setups becoming really viable, but software can scale across many many CPU cores in many many servers. You can have entire server farms dedicated to this, and professional render farms will still use software rendering.

Software can expose different rendering paradigms. Current hardware is very focussed around the triangle/vertex/fragment/rasterization paradigm; it's a case of picking one thing and optimizing it until it screams for mercy. GPUs are still a poor choice for e.g ray tracing, which is more commonly implemented in software.

Of course when it comes to a direct apples-to-apples comparison a GPU will beat software any day of the week - provided we're comparing areas where GPUs are stronger. But that's not to say that they're stronger in every area. Despite that, and for the purposes of this SE site, using hardware is generally the way to go but just be aware that there are use cases out there where software is also viable.

\$\endgroup\$
  • 8
    \$\begingroup\$ +1 for "software rendering can actually be more capable than hardware rendering, not less." \$\endgroup\$ – concept3d Apr 17 '14 at 6:59
10
\$\begingroup\$

Hardware or GPU rendering is, as you guessed using the graphical processing unit (aka Video Card) to render an image. The opposite is software rendering where the CPU is used.

Software rendering is usually used as a fallback when there is no (suitable) GPU available. However since the GPU is orders of magnitude faster software renders are almost never usefull since a CPU will usually not be able to render images in real time. Software rendering is useful when a high precision is needed of if extremely complicated formula's are required to render the image. Since CPUs are more general purpose then GPUs and thus have more capabilities. However this argument is becoming less and less valid as GPUs nowadays can handle more and more complex task and are no longer limited to just 32bit floats to represent numbers.

\$\endgroup\$
2
\$\begingroup\$

I think this is a really good question.

What I can imagine is:

  • VRAM is more limited than general RAM memory. In case of GPU rendering - every texture is more of an issue. You can store in average about 4 to 8 times more data in RAM than VRAM. Of course this scenario assumes that there is no system that is responsible for freeing/pushing unused/required textures from/to RAM/VRAM

  • In terms of multithreading it's a lot easier when you work with the software rendering - no need to share contexts

  • If you are doing 2D graphics - usually most frameworks carry on the implemetation of Dirty Rectangles Evaluation - what solves many performance issuess.

Still, rendering using OGL/D3D gives a lot more performance and possibilities. Shaders can do really amazing things, that are almost impossible with software rendering.

But technigques such as blitting, using colorkeys, have their own kind of feeling as if you were at the base level, the origin of computer graphics world.

I think it's at least good to know about the software rendering. It's really a very exciting world, not mentioning that it is the root of all what we see today.

\$\endgroup\$
  • 1
    \$\begingroup\$ You don't need hardware acceleration to run shaders. OS X 10.9 ships with a feature complete software implementation of GL4. The performance is unbelievably good for software rendering; it's not to the point where you can realistically play sophisticated games (to be fair, neither are the GPUs Apple ships their products with) but it's far more practical than using something like the Direct3D reference rasterizer. It is actually something you could ship working software using. \$\endgroup\$ – Andon M. Coleman Apr 19 '14 at 3:15
  • \$\begingroup\$ @AndonM.Coleman Not everybody uses Apple and I don't know of software renderers that support shaders on Linux and Windows. \$\endgroup\$ – luke1985 Apr 19 '14 at 11:05
  • 1
    \$\begingroup\$ That wasn't my point though. There are implementations of OpenGL where fully functional shaders run completely on the CPU. The fact that Apple is the developer is largely irrelevant. Your answer gave the impression that you thought you had to have a GPU to run modern shaders in OpenGL. \$\endgroup\$ – Andon M. Coleman Apr 19 '14 at 11:28
  • \$\begingroup\$ @AndonM.Coleman And that almost is correct, because in 80% of the cases you have to. \$\endgroup\$ – luke1985 Apr 19 '14 at 18:35
  • 2
    \$\begingroup\$ Shaders can be easily implemented via software rendering, infact even Tomb Raider 1 and Quake 1 had pixel shaders. It's the exact opposite, a CPU gives you way more control then the limiting vertex/fragment pipeline of current GPU's. \$\endgroup\$ – lama12345 Sep 19 '16 at 0:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.