The most common questions at a graphics programmer interview

Original author: Eric Arnebäck
  • Transfer
Recently, I was interviewed in game studios for a junior graphics programmer. As a result, I found out what skills they expect from a novice programmer and what questions they can ask. In this article, I put the questions together in a convenient list. The point is that other novice programmers can use it to prepare before going to the first interview. But I want to make a reservation that I do not recommend just remembering the answers to these questions . The topics on the list are topics that you need to understand and master in order to solve real graphics programming problems. You need to understand them, not remember the answers.

Questions are divided by topics: C ++, mathematics, optimization and computer graphics. Obviously, these are the main topics in everyday work. C ++ is often used in real-life tasks, so it’s natural that during the interview ask a lot of questions about it. In addition, graphics programming requires a better knowledge of mathematics than most other types of programming, which is why mathematical skills are of paramount importance. Finally, strong optimization skills are required to achieve 60 FPS and high-fidelity rendering. Let's look at the popular questions in each category.

C ++ Questions


  • When should virtual destructors be used? (Interviewers are absolutely delighted with this question!)
  • What is the difference between allocating memory on the heap and the stack?
  • What features of C ++ 11 and C ++ 14 do you use?
  • What are templates used for?
  • Explain the keyword inline.
  • What is the forward and reverse byte order (from high to low and from low to high)?
  • Explain what const-correctness is.
  • What is the overhead associated with calling a virtual function?
  • Probably, in some question you will be asked to perform some tricks on juggling bits with the help of operators like &, /and the like.
  • Probably in some question you will be asked to do something with data structures connected by pointers, like a tree. For example, draw a linked list.
  • What is the size of the pointer in C ++ (i.e. what shows sizeoffor the pointer)?

As a rule, nothing is asked about the advanced functions of the language. For example, I have never been asked to perform metaprogramming of templates, fortunately.

Math questions


In fact, the questions in mathematics are pretty monotonous.

  • What is a scalar product?
  • What is a vector product?
  • Why should you use quaternions instead of Euler angles?
  • How to apply matrices to transform an object? For example, how to use the matrices to scale, transform and rotate an object?
  • How to calculate the intersection between a ray and a plane / sphere / triangle?
  • Explain the concepts of world space, object space, and camera space.

Probably, they will offer to solve some practical problems associated with the use of scalar products, vector products and quaternions.

Optimization Questions


  • How to apply a hierarchy of bounding volumes (or octree, or something similar) to speed up the ray tracer?
  • Tell us about the cache (L1, L2 caches, and so on).
  • What is data-driven design ?
  • Explain how to optimize clipping for the pyramid of visibility using multithreading and SIMD (for example, see Andreas Asplund's blog post ).
  • Do you have experience using GPU performance profiling tools?

Game studios seem to suggest that you should have experience profiling and optimizing your code with tools like NVIDIA Nsight, so check them out. Here's another good book on computer architecture, including cache memory.

Computer Graphics Questions


  • What smoothing methods do you know (options: MSAA, MLAA, FXAA and TXAA)?
  • What are the typical elements of the rendering engine (for example, a system for processing clipping on the visibility pyramid, rendering shadows, processing light sources with something like delayed / direct shading, a system for processing materials in the engine, etc.)?
  • What methods of shadow generation do you know (is there a LOT of shadow generation techniques, for example, differential shadow maps, threshold smoothing using an exponential function, and a more recent method of moments )?
  • What are the pros and cons of deferred rendering?
  • Explain what physically correct rendering is?
  • Can you explain how the rendering equation works ?
  • What is BRDF? What do they mean when they say that “BRDF saves energy”?
  • How do branching performance in the shader affect (hint: read about the concept of warp in the GPU architecture)?
  • What are the advantages of the new APIs, such as Vulkan and DirectX 12, compared to the old OpenGL and DirectX 11 (hint: the main thing is reduced driver load)?
  • What was the last scientific article on the chart that you read, can you explain it (this is a fairly common question)?
  • Describe the entire graphics pipeline (the answer will probably be quite long. You will talk about the vertex shader and fragment shader, about perspective-correct interpolation, about the Z-buffer, about double buffering of the framebuffer, about alpha mixing, transformation matrices, uniform coordinates, reflection models in the fragment shader and so on).

The last question is especially common during interviews. If you are not completely sure about all parts of the pipeline, then I advise you to write a small software rasterizer. This exercise allows you to get a deeper understanding of the pipeline, since creating a software rasterizer is in many ways similar to implementing a graphic pipeline from scratch.

Many of the above are warm-up questions. They will be followed by deeper questions (I will not disclose them, so as not to substitute the company). However, this list of questions provides a good understanding of what kind of knowledge an employer expects from a novice programmer.

Some of you are still studying and choosing curriculum subjects for working in computer graphics. My advice is to focus primarily on high-performance computing and applied mathematics. From programming subjects, try to master multithreading, computer architecture and GPGPU, as well as other topics related to high-performance computing. Among the courses of mathematics are linear algebra, multidimensional calculus (I think this course is called Calculus III in the USA), probability theory, numerical optimization, differential equations and computational geometry. First of all, focus on applied mathematics, and not on more abstract mathematical topics, such as topology and abstract algebra, since they are not so needed in computer graphics.

In general, you are not expected to understand all the nuances of computer graphics. The concept of "computer graphics" covers a wide range of topics, such as global lighting, occlusion culling, shadow generation, path tracing, fluid modeling, geometry processing, GPGPU, physically correct rendering, and so on. It would be unreasonable to expect that June knows all the nuances of these topics. But if you specify something in the resume, be prepared to answer this topic in detail.

Thus, you do not need to know EVERYTHING about computer graphics. It often happens that you are asked to talk about the main projects that you worked on. Then the interviewer will ask many additional questions and ask you to explain in detail the details of your project. Therefore, my advice: before the interview, select several projects that you are especially proud of - and prepare for a detailed explanation.

In my opinion, the best way to prepare for an interview is to work in your free time on a large number of third-party projects. Demonstrating the projects you worked on is a good way to show yourself and demonstrate that you are truly passionate about this business. Finally, working on third-party projects will hone programming skills. And this, in turn, will greatly help to answer all the questions that I have listed in this article.

Also popular now: