Graphics Reference
In-Depth Information
cos 1 α
cos 2 α
cos 4 α
cos 16 α
cos 64 α
cos 256 α
cos 1024 α
cos 2048 α
Figure 4.19. Polar coordinate plot of the specular lobe with various specular power values. The red
ellipse is the specular lobe and the black isosceles triangle shows the cone angle extents using the formula
presented earlier; α is the angle and cos α is powered to various specular power values.
So, for any distribution model, we average at pre-computation time all the
reflection vectors within the specular lobe—importance sampling using uniform
random variables [0-1]—with a specific roughness value that gives the vector
where the reflection vector is strongest, and then we store this vector in a 2D
texture table. The reason we average all the reflection vectors within the lobe is
the fact that complicated BRDF models often don't produce a lobe with respect
to the pure specular reflection vector. They might be more vertically stretched or
behave differently at grazing angles, and we are interested in finding the reflection
vector that is the strongest within this specular lobe, which we can clearly see in
Figure 4.20.
The RGB channel of this table would contain the local reflection vector and
the alpha channel would contain either an isotropic cone-angle extent with a single
value or anisotropic cone-angle extents with two values for achieving vertically
stretched reflections, which we revisit later.
For this chapter, we just assume that we use a Phong model. We need to
construct an isosceles triangle for the cone-tracing pass using the newly obtained
angle θ .Let P 1 be the start coordinate of our ray in screen space and P 2 be the
end coordinate of our ray, again in screen space. Then the length l is defined as
l =
P
=
P 2
P 1
.
Search WWH ::




Custom Search