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:

    Popular art is normally decried as vulgar by the cultivated people of its time; then it loses favor with its original audience as a new generation grows up; then it begins to merge into the softer lighting of “quaint,” and cultivated people become interested in it, and finally it begins to take on the archaic dignity of the primitive.
    Northrop Frye (b. 1912)

    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)