Graphics Reference
In-Depth Information
image techniques discussed earlier could improve
the blending. Additional effects like the secondary
rainbow in the natural scene are not included in
the simulation.
Note that we've manipulated the alpha com-
ponent of the rainbow colors to smooth the out-
side edge of the rainbow and to show the lightened
color inside the rainbow. These effects are not as
strong as you might like, and an exercise invites
you to work with the fragment shader to improve
them. However, a significant problem in this simu-
lation is that conditions are much more complex
than simply creating a rainbow. In the real image,
there was a rain squall about 100 yards from the
camera but the camera location had no rain, so
the tree in the foreground is much darker in the
actual image because it was not in the rain. The
background in the actual image is obscured by the
heavy rain that causes the rainbow, but simulating
that is not part of simulating the rainbow. We also have not included the sec-
ondary reflection in the raindrop that gives us the faint secondary rainbow in
the photo. Without using this additional information, the simulated image in
the middle of Figure 16.17 is about all we can do.
Figure 16.16. The Lee diagram of the color
of a rainbow for different angles and water
droplet radii.
Figure 16.17. A computed rainbow against a gray quad (left), against a natural scene (middle), and compared
with an actual photo of the scene with a rainbow (right).
Search WWH ::




Custom Search