views:

246

answers:

3

What are some good graphics programming interview questions? These could be math questions, OpenGL questions, DirectX questions, shader questions, etc.

+1  A: 
  1. Explain the difference between left-hand and right-hand coordinate systems. Which is better? Which does your choice of engine use?
  2. What are the advantages and disadvantages of quaternions?
  3. What are the two main types of shader, and what do they do?
  4. How would you apply multiple textures to a surface and control which one covers which?

This could go on for pages, frankly. Graphics programming is a complex and rich area of knowledge.

Marcelo Cantos
1 = LOL .. utterly pointless. 2 = Almost as subjective as 1. 3 = F**KING OBVIOUS 4 = Pretty simple.I'd argue that asking such questions is going to stop you employing an utter idiot when they start arguing RH is better "cos thats what GL uses, innit" but in general those questions won't help you figure out much, IMO. I for one wouldn't want to work for someone asking me questions like that.
Goz
@Goz: When interviewing for general programming roles, I like to ask candidates to write a function on the whiteboard that reverses a linked-list (and I get similar reactions to yours). It weeds out the vast majority of candidates, allowing me more time to drill down much deeper on those that pass the litmus test. So, yes, the above questions are obvious and simple; that was deliberate. I agree that it's not enough to convince you that they are a gun programmer, so you would want to throw in harder questions as well.
Marcelo Cantos
Also should I get into OpenGL? I really like Microsoft technologies and have a little experience with DirectX. My goal is to become generally an expert in graphics programming.
Blub
@Blub: Use whatever you think you'll end up needing. If you plan to do cross-platform stuff, DirectX won't cut it. But if you're sticking to Windows, it's probably the best choice. DirectX used to suck big time, but the API has improved enormously over time, and is now just as good as, if not better than, OpenGL (apart from the cross-platform thing).
Marcelo Cantos
+1  A: 

(These are OpenGL questions) To catch the basics:

  1. How does the OpenGL pipeline work? Which part is responsible for setting up camera parameters, and which part is responsible for placing objects in the world?
  2. How can you setup a perspective projection matrix, and what role do homogenous coordinates play there?
  3. Which is better: setting the near plane distance to be some very small value, say 0.00001 or setting it to a larger value? More importantly, why is that good or bad?

To catch basic knowledge of the fixed-function pipeline and shaders, you can always ask questions about implementing bits of the fixed-function pipeline as shaders. This is important if they have to write shaders, since fancier models are usually extensions of the basic models.

  1. How do you write the fog functionality in a vertex/fragment program pair?
  2. How do you write the standard lighting equation in a vertex/fragment program pair?
  3. How do you implement bump-mapping and normal mapping in a vertex/fragment program pair?
Carlos Scheidegger
+1  A: 
  1. Have you ever written a software engine? (If yes find out more!)
  2. Explain the hardware graphics pipeline in as much detail as you can.
  3. Explain why a view matrix is the inverse of the orthonormal orientation matrix of the camera.
  4. How would you add new features to the engine without driving everyone up the wall?

Its a hard thing to ask really. Because if you want a good graphics programmer you need someone who has a good knowledge of a lot of things.

In my opinion a programmer that can't answer 2 & 3 to a "good" standard aren't worth bothering with. If they answer yes to 1 then 2 & 3 should be a breeze but its not like anyone ever lies in an interview ( ;) ) so put them on the spot about it. If they can answer 4 well (ie you need a good conversion pipeline, pretty much, and yet can explain it well) then they are worth employing purely on that basis, IMO.

I've worked many graphics renderer jobs over the years. The biggest issues I have are people who "hack" to get good results. I can level that at a number of, supposed, "gods" of the game graphics rendering community as well. Its all well and good being able to do nifty things but, most importantly, can they produce good results on time and to the specification they laid out. Furthermore, will it actually work at an acceptable frame rate in the game and is the code in anyway readable.

Goz
@Goz: What type of exercise would you recommend to learn this stuff? I bought a bunch of math and graphics books, but I simply dont know what to do with them. Reading them like a novel cover to cover is too dull for me, I forget everything I read in a matter of seconds. I need a good exercise that will teach me the basics, while at the same time not being completely out of touch with reality. (for example: making a game is fun, but making a game that looks and plays like utter crap just to learn the basics is not fun. I would love to see some actual benefit already from learning the basics.
Blub