Shading

What is it?

Shading is the process that computes the color and brightness of a surface in a 3D scene based on lights, material properties, and viewer direction. It encompasses algorithms and shader programs that determine how light is reflected (diffuse, specular) and how attributes like glossiness, roughness, and shading gradients appear. Shading can be performed at different granularities (per-face, per-vertex, per-pixel) and is central both to artistic styles (e.g., toon shading) and to photorealism (e.g., PBR — Physically Based Rendering).

Practical example

Imagine you're building an AR app that places a metal vase on a table. With simple Gouraud shading (per-vertex), you get smooth color transitions but specular highlights can be inaccurate or missing for small shiny details. Using Phong or per-pixel PBR shading with a normal map and a correct BRDF produces sharp, realistic highlights and reflections that make the vase look convincing; note that per-pixel computations and high-resolution normal maps are more expensive, so on mobile XR devices you often need optimizations like LODs, baked lighting, or texture atlases.

Test your knowledge

Which technique computes lighting per pixel using interpolated normal vectors and therefore produces accurate specular highlights?

Ask Lex
Lex knows the context of this term and can give targeted explanations, examples, and extra context.
Tip: Lex replies briefly in the widget. For more detail, go to full screen mode.

Learn our language

Learn these terms from real professionals and take your skills further at KdG MCT.

Study at KdG