Gamesday09 Realtime Lighting

  • View
    510

  • Download
    0

Embed Size (px)

Text of Gamesday09 Realtime Lighting

Folie 1

Shader?

2

What can they do?What cant they do?Vs, ps, gs etc

3

Streaming, extremely parallel4

One shader per material9

Too much11

+Crysis uses max 4 lights per passWhat to do with more lights => do the whole thing againGeometry overhead (visibility) => early z-pass12

Solution: split in 2 passes14

Render lights per pixel, only visible pixels are lit16

Scene DepthR32Normal XNormal YNormal ZR10G10B10A2Diffuse ColorSelf IllumR8G8B8A8VelocityR8G8B8A8SpecularityGlossinessPacking, memory performance tradeoff17

Who is using it?18

Disadvantage?19

Other than phong, Mat-id, branching => not enough data etc.=> Light prepass20

Add another passHow does it work?Smaller gbufferLight accum (same opt as deferred)Diff + spec (4 vs. 6 channel)Forward shading using light accum

21

Complexity (N+L+M) => predictable performanceMost flexible

22

a bit overhead geometry vs. light complexityinferred lighting23