Graphics Reference
In-Depth Information
Light Bloom
Now that we have looked at a simple image postprocessing technique, let's
consider a slightly more complicated one. Using the blurring technique
we introduced in the previous example, we can implement an effect
known as light bloom. Light bloom is what happens when the eye views a
bright light contrasted with a darker surface—that is, the light color bleeds
into the darker surface. As you can see from the screenshot in Figure 14-6,
the car model color bleeds over the background. The algorithm works as
follows:
1.
Clear an off-screen render target ( rt0 ) and draw the object in black.
2.
Blur the off-screen render target ( rt0 ) into another render target ( rtl )
using a blur step of 1.0.
3.
Blur the off-screen render target ( rt1 ) back into the original render
target ( rt0 ) using a blur step of 2.0.
Note: For more blur, repeat steps 2 and 3 for the amount of blur,
increasing the blur step each time.
4. Render the object to the back buffer.
5. Blend the final render target with the back buffer.
Figure 14-6
Light Bloom Effect
 
Search WWH ::




Custom Search