Lably
Skip to content

Deferred shading

Screen-space shading technique

  • 4 min read
  • 6 chapters

Related on Lably

Through Shading and Minecraft

On the first pass of a deferred shader, only data that is required for shading computation is gathered. Positions, normals, and materials for each surface are rendered into the geometry buffer (G-buffer) using "render to texture". After this, a pixel shader computes the direct and indirect lighting at each pixel using the information of the texture buffers in screen space.

Screen space directional occlusion can be made part of the deferred shading pipeline to give directionality to shadows and interreflections.

Advantages

The primary advantage of deferred shading is the decoupling of scene geometry from lighting. Only one geometry pass is required, and each light is only computed for those pixels that it actually affects. This gives the ability to render many lights in a scene without a significant performance hit. There are some other advantages claimed for the approach. These include simpler management of complex lighting resources, ease of managing other complex shader resources, and the simplification of the software rendering pipeline.

Sign in to keep reading

5 more chapters are free with a Lably account.

More in Computing and communication