This question paper consists
of 2 printed pages each
of which is identified by the Code COMP5822M
© UNIVERSITY OF LEEDS
School of Computing
August 2020
COMP5822M: High Performance Graphics
Answer all questions. There are 100 marks in total.
Submit a single PDF document with your answers.
Aids: You may use any reference materials you wish, including internet searches. You may use a calculator. You may use code that you have developed yourself or been provided by the instructor, if that helps you with the answer.
Time allowed: 50 hours
Question 1: GPU Architecture & Pipelines [10 marks]
Describe one design choice in Vulkan that you think was particularly well done, and one that you think was particularly poorly done. Explain why you think so.
Question 2: GLSL Conventions & Vertex Buffers [10 marks]
In Vulkan, vertex data can be located in several different types of memory. Describe all of the possible locations for vertex data to be stored, and under what circumstances it makes sense to store vertex data in each type of location.
Question 3: Phong Shading [10 marks]
For Phong shading, the vertex shader interpolates the material properties, light properties, colour, texture coordinates and normal vector, then passes these to the fragment shader where the lighting calculation is performed, using texture lookups to retrieve additional information.
Suppose you were working in an architecture where you were ONLY allowed to pass a colour from the vertex shader to the fragment shader, but had full control over the computation in each stage. What would you need to do to perform Phong shading with this limitation?
Question 4: Local Illumination [10 marks]
You are given an existing render engine which uses standard lighting, and are asked to upgrade it to use a light field – a volumetric description of how much ambient light falls on each surface in the environment. This light field is computed in a compute shader written by another programmer and is not under your control, but is accessible as a 3D texture using global x,y,z coordinates as indices. How would you incorporate it into your fragment shader?
Question 5: Attribute Mapping [10 marks]
You are working on a game in 3D involving large numbers of asteroids for which it is impractical to do detailed modelling, but where fine details are required when up close. Moreover, as an asteroid passes through atmosphere, it will erode in an essentially random fashion. How would you implement this using only GPU-based computation?
Question 6: Fur Shading [10 marks]
Fur shading often assumes that the fine hairs stand straight up from the surface, but it is frequently the case that there is an overall directional pattern to the fur (eg all fur orients towards the tip of a cat’s tail). How would you implement this in your fur shader?
Question 7: Emissive Behaviour [10 marks]
Fluorescent emission can be triggered by an ultraviolet light source – i.e. any object hit by the light source starts glowing. However, there is typically a lag between the ultraviolet light hitting and the glow beginning, with the result that the glow starts several frames late, and lasts several frames after the ultraviolet light is switched off. If you have an environment with some surfaces that behave this way and some that do not, how would you implement it?
Question 8: Mipmaps [10 marks]
Suppose that Vulkan did not have mipmapped textures available. How would you implement them using shaders?
Question 9: Real Time Water [10 marks]
Caustics are lighting effects as light refracts at transparent surfaces. In essence, rather than light continuing in a straight line, it gets bent, often by a large amount. In theory, we could produce a map where, for each point p on the refracting surface, we store the equivalent point q for the previous bounce of the light. Why would this be impractical in real-time rendering?
Question 10: Shadow Mapping [10 marks]
Describe a technique that we discussed where we use shadow maps for purposes other than computing shadows. What problem does it solve, and why is it the best solution available?