The document discusses deferred rendering used in Dying Light. It begins with an agenda and overview of deferred shading and why it was used. Key reasons included having over 250k objects with multiple materials and thousands of lights with day-night cycles and weather changes. The document then covers the G-Buffer format, including encoding specular and diffuse values together, storing normals, roughness, and mask values. It describes optimizing the G-Buffer layout to be simple, slim, lossless, and physically based.
45. G-Buffer
Diffuse/Specular alpha channel - translucency
● simple subsurface scattering
● varying specular
● signed format?
M Dielectric Specular H
0 1 254 255
46. G-Buffer
Diffuse/Specular alpha channel - translucency
● simple subsurface scattering
● varying specular
● signed format?
● encoding/decoding - single mad instruction (alpha * 2.0 - 1.0)
H Translucent Dielectric Specular M M Dielectric Specular H
0 1 126 127 128 129 254 255
-1.0 0.0 1.0
47. G-Buffer
Diffuse/Specular alpha channel - translucency
● simple subsurface scattering
● varying specular
● signed format?
● encoding/decoding - single mad instruction (alpha * 2.0 - 1.0)
● encoded specular inversion - abs()
H Translucent Dielectric Specular M M Dielectric Specular H
0 1 max min 126 127 128 129 min max 254 255
-1.0 0.0 1.0
48. G-Buffer
Diffuse/Specular alpha channel - leaves
● simplified lighting for tree crowns
H Translucent Dielectric Specular M M Dielectric Specular H
0 1 max min 126 127 128 129 min max 254 255
-1.0 0.0 1.0
49. G-Buffer
Diffuse/Specular alpha channel - leaves
● simplified lighting for tree crowns
● no specular
H Translucent Dielectric Specular M M Dielectric Specular H
0 1 max min 126 127 128 129 min max 254 255
-1.0 0.0 1.0
50. G-Buffer
Diffuse/Specular alpha channel - leaves
L Translucent Dielectric Specular M M Dielectric Specular H
0 1 max min 126 127 128 129 min max 254 255
-1.0 0.0 1.0