Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I don't really know when vertex and/or pixel shaders became available for consoles and computers, but what could we do without them ? I don't really understand what is achievable with shaders and what is not without them, and what are the true advantages while using them.

I guess the advantages of using shaders are performance and better flexibility, but on the other hand, I am quite speechless when looking at the syntax...

I think a really good rendering quality can be achieved without using them, but I'm not sure which one...

share|improve this question
What's your question? – Sergio Oct 4 '10 at 13:40
It's also in the title – jokoon Oct 4 '10 at 14:45
up vote 9 down vote accepted

Shaders facilitate graphics rendering that is both flexible and efficient.

Once upon a time all graphics were done in software. This was very flexible, but not very efficient.

In the mid 90s add-on graphics cards became popular because they vastly accelerated graphics, but at the cost of flexibility. Writing pixels became a lot cheaper but reading them became much harder and/or slower.

Now that graphics are faster, and technology has improved (or become more affordable, depending on how you look at it), some flexibility can be added back into the graphics pipeline. Shaders give you this flexibility. The syntax is quite low-level because the hardware it is aimed at is also quite low-level. It's a compromise.

Really good rendering quality can indeed be achieved without them, depending on your definition of quality. You can stick to CPU-based graphics, if you don't mind those graphics being quite slow. Or, you can use the GPU and used the old fixed-function pipeline, which gives you a subset of the shader functionality. Whether that subset is "really good" or not is subjective - it was certainly good enough for many years - but you miss out on some interesting modern rendering techniques as a result, as the fixed function pipeline has no way of performing the completely arbitrary transformations on vertices and pixels that shaders can perform.

share|improve this answer
:The syntax is quite low-level because the hardware it is aimed at is also quite low-level. It's a compromise.": earlier on I also wanted to ask something about that: since the shader languages are low-level, don't you think it would be an idea to create a shader++ language, so we could use some kind of programming language dedicated to 3D programming. We could think shaders are like C, don't we some equivalent of C++ but for shaders ? I really don't know how shaders work, but maybe a high level shader language is not possible at all... ? is it ? – jokoon Oct 4 '10 at 21:42
Originally when shaders were introduced, you had to write them in their own ASM language. Todays version of shaders (HLSL, GLSL, CG) are already very high level, providing a C-like syntax. – 5ound Oct 4 '10 at 23:24
As 5ound pointed out we already have high-level shading languages, but some people also build higher-level systems on top of that for artist driven shader creation. See the material editor in UE3 for example, or RenderMonkey. – Chris Howe Oct 5 '10 at 15:41
So it is potentially doable to craft a 3d engine using only shaders ? – jokoon Oct 6 '10 at 12:30
Shaders don't handle input, audio, networking, so no. – Kylotan Oct 7 '10 at 10:20

The fixed pipeline is rather limited. Something as simple as Phong-Shading already requires a shader (the shading capabilities of the fixed pipeline end with Gouraud-Shading). The possibilities that open up with shaders are huge. Some of them are: better shadowing-techniques, ambient-occlusion, normal-mapping, etc.

That doesn't mean you can't create great looking games without shaders though. AFAIK Torchlight only uses fixed pipeline and looks awesome. Also: If you're doing 2d graphics, you'll probably be fine with fixed pipeline only.

share|improve this answer
I don't know why you're assuming I would do 2d graphics. – jokoon Oct 5 '10 at 19:03
I'm not assuming that you would do 2d graphics. I just wanted to add that shaders are probably less relevant for 2d graphics in general. – bummzack Oct 5 '10 at 21:58
I'm so eager to learn 3D theories in my school :x – jokoon Oct 7 '10 at 6:41

Just some examples that are hard to do without shaders:

  • Normal mapping
  • Parallax mapping
  • Cartoon rendering
  • Bloom
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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