Game Development Reference
In-Depth Information
L
V
H
H
V
L
(a)
(b)
Figure 7.24. (a) Light reflected by the left microfacet is partially blocked by the right
microfacet. (b) Light is blocked by the right microfacet before reaching the left micro-
facet.
2sin
γ
x
=
.
(7.76)
(
)
sin
β π
+
2
We can express each of the sine functions in Equations (7.75) and (7.76) as co-
sine functions that have been shifted by
(
)
sin
α
=
cos
π α
2
=
NH
VH
NV
(
)
(
sin
βπ
+
2
=
cos
β
=
)
(7.77)
sin
γ
=
cos
π γ
2
=
.
Using the dot products corresponding to each of the cosine functions lets us ex-
press the fraction of light G reaching the viewer as
(
)(
)
2
NH NV
VH
x
G
==
.
(7.78)
1
w
When light is blocked before reaching a microfacet, we can calculate the
fraction G that still reaches the viewer by simply exchanging the vectors V and
L in Figure 7.25 to obtain
(
)(
)
2
NH NL
LH
x
G
==
.
(7.79)
2
w
The three possible cases pertaining to light reflected by a microfacet are that
the light is completely unobstructed (the fraction of light reaching the viewer is