19

I've seen this question on SO, but here i want it to focus on GFX.

So in your opinion what applications/features should every aspiring GFX programmer write/change to get better?

Community wiki since there is no "right answer".

LE: Not referring to actual games, but to graphical features for example changing something in an engine (e.g how it loads objects), making a compositor, so on and so forth.

Cristina
  • 400
  • 1
  • 9
  • 19
  • 2
    Similar to this question: http://gamedev.stackexchange.com/questions/854/what-are-good-games-to-earn-your-wings-with/856#856 – Bryan Denny Aug 06 '10 at 17:20

4 Answers4

22

My answer is always the same: if you haven't written one before, write a raytracer.

You'll have to deal with optimization structures, numerical precision, and all sorts of other issues, but you'll also work directly with the mathematics of light in a way that you rarely do when dealing with all the hacks and approximations that make up a production real-time renderer.

Strip away all the edifice of loading systems, buzzwords-of-the-week, deferred-this or forward-that, and you're left, finally, with light traveling through a medium. In the end, that's all there is to graphics.

Charlie
  • 526
  • 3
  • 7
  • Interesting, I was contemplating suggesting a raytracer as well, a very nice math exercise. I do disagree with deferred being a buzzword of the week, it's, like raytracing, a fairly big shift in how you approach your rendering, which, for a graphics programmer seems to be something you should be aware of. – Kaj Aug 06 '10 at 18:29
  • I would say that optimization are not as important as dealing with arbitrary meshes, which is a step a lot of people never get to with raytracers. – Jonathan Fischoff Aug 06 '10 at 18:31
  • I'd second (third?) this suggestion, with the caveat that (as mentioned) it needs to support meshes, and not just stop at shiny-spheres-on-a-chequerboard. Bonus points for any attempt at global illumination.

    Even if you don't heavily optimise it into something actually useable, you should strive to understand which bits are slow and why.

    – JasonD Aug 06 '10 at 18:55
  • And one caveat with this suggestion - while light traveling trough a medium is all there is to graphics, it will give you very little training in what you need in actual (current) production environments. – Kaj Aug 06 '10 at 19:49
  • 1
    +1 writing a ray tracer was the most useful thing I learned in my college graphic's class – Bryan Denny Aug 07 '10 at 17:09
7

It may be of little practical use these days, but writing at a software renderer, at least a basic one (maybe just some spinning textured cubes), is a worthwhile exercise.

Understanding how to transform, project, clip, depth-sort, rasterize, and texture map polygons yourself will give you a much better understanding of what 3D hardware and rendering APIs are doing

bluescrn
  • 3,407
  • 25
  • 30
  • pretty much this. barring this, a sprite blitter with alpha support.

    ..or at least something, ANYTHING, where you manipulate pixels by their bit values.

    – Lassi Kinnunen Jun 07 '17 at 05:54
6

While not rendering code, I think writing a BSP compiler and accompanying traversal code is a nice exercise in vector maths.
Secondly, a deferred renderer. Not because it's the end-all answer to rendering, but it'll give you insight in another approach to rendering.

Kaj
  • 3,246
  • 21
  • 18
2

Learn the mechanics and skills of writing good shaders. While not 100% necessary in all cases, it's a valuable skill to know.

RCIX
  • 1,106
  • 2
  • 15
  • 25
  • I agree with your answer however it's too broad and some resources and links to them wouldn't hurt for a complete answer :). – lukas.pukenis Jun 30 '14 at 13:50