Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Computer Graphics (rasterisation, ray tracing, WebGPU) Module 7

Light, shading and transparency interview questions

Interview questions on light, shading and transparency: warm-ups, then what each harder question tests and how a good answer starts.

15 questions: 4 warm-ups and 11 with model answers · Levels: Fresher to staff

Warm-up questions

Short questions with short answers, each answered in full.

  1. Fresher to mid

    What does Lambert's cosine law say, and why does a diffuse shader compute max(0, n · l) instead of an angle?

    Answered in the lesson Light sources and diffuse reflection

  2. Fresher to mid

    What is the difference between the Phong and the Blinn-Phong reflection models?

    Answered in the lesson Phong and Blinn-Phong reflection models

  3. Fresher to mid

    What is the difference between Gouraud shading and Phong shading, and how does each relate to the Phong reflection model?

    Answered in the lesson Flat, Gouraud and Phong shading

  4. Fresher to mid

    What is premultiplied alpha, and why do compositors and GPUs prefer it to straight alpha?

    Answered in the lesson Transparency, blending and alpha compositing

Questions with model answers

What each question tests, the first step of a good answer and the follow-ups to expect.

  1. Fresher to mid

    An artist moves a 100 cd point light from 4 m to 2 m in front of a poster 2 m wide to make it "twice as bright". The centre comes out four times as bright, and the edges are now clearly darker than the centre. Explain both with numbers, and design a brightness control artists can reason about.

    What it tests
    The inverse-square law in candela and lux, the cosine law combined with distance across a surface, and a control that matches what an artist means by brighter.
    First step
    Write the illuminance before and after: 100 ÷ 4² = 6.25 lux and 100 ÷ 2² = 25 lux, four times as much. Twice the light needs the distance divided by √2, 2.83 m, or the intensity doubled at 4 m. Then work out a point at the poster's edge, 1 m from the centre, where the distance and the angle both change.
    Follow-ups

    From the lesson Light sources and diffuse reflection

    Model answer, Pro. Model answers open with any pass; prices are in the notice on this page.

    Opening the model answers with your pass…

    Model answers open with any MySmartCoPilot pass.

    • Pro pass · 1 week₹79$2.99
    • 30 days₹179$5.99
    • 1 year₹1,699$45

    One payment; a pass never renews. The price shown is the total you pay: no fees or charges are added at checkout.

    It also opens every other in-depth part in Learn and every Pro tool. Sales are final, except where the law gives you a right to withdraw, for example in the EU and the UK (refund policy).

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  2. Mid to senior

    A face lit by a warm key light and a fill light shows flat, yellowish patches where the two overlap. A teammate proposes clamping each light's contribution to 1 before adding them up. Explain why that does not fix it, and what the pipeline should do instead.

    What it tests
    Adding lights in linear light, where clamping belongs, the hue shift of a clipped channel, and floating-point targets with an exposure or tone mapping before the final encode.
    First step
    Print the linear sum at a patch before any clamp. If a channel is above 1, the patch is overexposed by the sum, not by one light: clamping each term to 1 still leaves a sum above 1 and changes almost nothing. Then compare the channels: when red clips and green keeps rising, the hue moves towards yellow.
    Follow-ups

    From the lesson Light sources and diffuse reflection

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  3. Mid to senior

    Testers report a faint second highlight on the shadowed side of every shiny prop, opposite the real one. The fragment shader computes the specular term as pow(dot(r, v), 32.0) after r = reflect(-l, n). Explain the bug with numbers, fix it, and say what a fractional shininess would have shown instead.

    What it tests
    Even powers of negative cosines, the clamp and the n · l test of the specular term, and pow outside its domain for fractional exponents.
    First step
    Print dot(r, v) at a pixel of the ghost. It is negative, close to −1, because r points away from the viewer there. Then ask what an even power does to a negative number, and which test of the shader should have stopped the term before pow ever saw it.
    Follow-ups

    From the lesson Phong and Blinn-Phong reflection models

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  4. Mid to senior

    An engine switches its shiny materials from Phong to Blinn-Phong, and every highlight suddenly looks about three times bigger. The art team asks for one conversion factor for the shininess values they tuned. What do you give them, and where will it still look different?

    What it tests
    The half-angle relation behind β ≈ 4α, how far a single factor can be trusted, and how the two highlights compare at grazing angles.
    First step
    Measure before answering: with the same exponent, the Blinn-Phong highlight on a sphere covers 3.5 times the area of Phong's. In the plane of incidence the angle from n to h is half the angle from r to v, so the matching exponent is about 4α. Then test how far one factor can be trusted.
    Follow-ups

    From the lesson Phong and Blinn-Phong reflection models

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  5. Senior to staff

    A lighting artist raises a Phong material's shininess from 8 to 128 to make a car look polished. The highlight shrinks but gets no brighter, and the car looks duller overall. Explain this with an energy argument and numbers, and fix it without leaving the classic model.

    What it tests
    The total light a specular lobe reflects as its exponent changes, how to normalise the lobe, and what the diffuse and specular terms reflect together.
    First step
    Stop looking at the peak, which stays at ks. Add up the light the specular term sends into every direction above the surface, with the light along the normal, once for each exponent, and compare the two totals with what a white matte surface sends back.
    Follow-ups

    From the lesson Phong and Blinn-Phong reflection models

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  6. Mid to senior

    A slowly turning, low-poly shiny ball in a mobile game is lit per vertex. Its highlight fades out, then pops back on another part of the ball, frame after frame. Explain why with numbers, and propose two fixes with their costs on a device that can afford little per-pixel work.

    What it tests
    Why a per-vertex blend cannot show a highlight between vertices, how the highlight's width compares with the spacing of the vertex normals, and what each fix costs.
    First step
    Write down where the highlight is: around the direction where n equals the half vector. Then compare its width with the angle between neighbouring vertex normals of the mesh, and ask what a weighted average of three corner values can and cannot show between them.
    Follow-ups

    From the lesson Flat, Gouraud and Phong shading

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  7. Mid to senior

    After an artist stretches a character's arm to twice its length, its lighting looks wrong: the arm seems lit from a different side than the rest of the body. The vertex shader multiplies each normal by the model matrix. Explain the error with numbers and fix the shader.

    What it tests
    Why normals do not transform like positions under a non-uniform scale, the normal matrix, and where the normalisation must happen.
    First step
    Take one point of a simple stretched shape, such as a sphere stretched along one axis, and compute its true normal from the stretched surface. Then compare it with the normal multiplied by the model matrix, and measure the angle between them.
    Follow-ups

    From the lesson Flat, Gouraud and Phong shading

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  8. Mid to senior

    Models a team exports to glTF from a tool that writes no normals look faceted in every viewer, although they looked smooth in the modelling tool. Explain why, and design the step that adds normals on import, including what happens at sharp edges.

    What it tests
    glTF's rule for primitives without normals, computing vertex normals by averaging face normals and choosing the weights, and splitting vertices at creases.
    First step
    Check what the glTF specification requires of a client when a primitive has no NORMAL attribute. Then decide how to compute a normal per vertex from the faces around it, and what to do where two faces meet at a sharp edge.
    Follow-ups

    From the lesson Flat, Gouraud and Phong shading

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  9. Mid to senior

    A game's leaf sprites, white-green shapes on transparent backgrounds, show dark outlines when the camera zooms out and the textures are minified with mipmaps and linear filtering. Explain the outlines with numbers and fix the asset pipeline and the renderer.

    What it tests
    Filtering straight-alpha textures, the colour stored under transparent texels, premultiplying at import, and the blend state that matches premultiplied textures.
    First step
    Look at what the texture stores in its transparent texels: often black, (0, 0, 0, 0). Then average one transparent texel with one opaque white texel, as a filter would, and composite the result over a white background first as straight alpha and then as premultiplied alpha.
    Follow-ups

    From the lesson Transparency, blending and alpha compositing

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 2 minutes
  10. Mid to senior

    Glowing embers rise behind a large glass window. As the camera moves, the embers sometimes show dimmed behind the glass and sometimes bright as if in front of it. Both are transparent, sorted by their centres. Explain the flicker and design the draw order and blend states.

    What it tests
    Sorting by object centres and when it flips, how additive and over blending combine with each other, depth writes for transparent surfaces, and an order that cannot flip.
    First step
    Work out the centre distances of the glass and of the particle system as the camera moves: they cross, so the sort swaps the two. Then compare what each order puts in the pixel: embers added before the glass is laid over them, or after.
    Follow-ups

    From the lesson Transparency, blending and alpha compositing

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  11. Senior to staff

    A WebGPU canvas configured with alphaMode "premultiplied" sits over a web page. Wherever translucent user interface panels are drawn, the page's text shows faintly through areas that should be opaque, and one browser shows odd colours there. Explain both with numbers and fix the pipeline.

    What it tests
    How a premultiplied canvas is composited with the page, the alpha component of a blend state, colours above alpha, and a check that catches it.
    First step
    Read back the canvas's alpha at a pixel where a translucent panel was drawn over the opaque clear colour, and compare it with the coverage over predicts there. Then check whether any colour channel of that pixel is larger than its alpha.
    Follow-ups

    From the lesson Transparency, blending and alpha compositing

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes

All Computer Graphics (rasterisation, ray tracing, WebGPU) interview questions · The Computer Graphics (rasterisation, ray tracing, WebGPU) track

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.