Volumetric Lighting - How Volumetric Lighting Works

How Volumetric Lighting Works

Volumetric lighting requires two components: a light space shadow map, and a depth buffer. Starting at the near clip plane of the camera, the whole scene is traced and sampling values are accumulated into the input buffer. For each sample, it is determined if the sample is lit by the source of light being processed or not, using the shadowmap as a comparison. Only lit samples will affect final pixel color.

This basic technique works, but requires more optimization to function in real time. One way to optimize volumetric lighting effects is to render the lighting volume at a much coarser resolution than that which the graphics context is using. This creates some bad aliasing artifacts, but that is easily touched up with a blur.

You can also use stencil buffer like with the shadow volume technique

Another technique can also be used to provide usually satisfying, if inaccurate volumetric lighting effects. The algorithm functions by blurring luminous objects away from the center of the main light source. Generally, the transparency is progressively reduced with each blur step, especially in more luminous scenes. Note that this requires an on-screen source of light.

Read more about this topic:  Volumetric Lighting

Famous quotes containing the words lighting and/or works:

    A mother’s happiness is like a beacon, lighting up the future but reflected also on the past in the guise of fond memories.
    HonorĂ© De Balzac (1799–1850)

    I cannot spare water or wine, Tobacco-leaf, or poppy, or rose;
    From the earth-poles to the line, All between that works or grows,
    Every thing is kin of mine.
    Ralph Waldo Emerson (1803–1882)