Skip to Content
GPU PRO 3
book

GPU PRO 3

by Wolfgang Engel
February 2012
Intermediate to advanced
408 pages
12h 24m
English
A K Peters/CRC Press
Content preview from GPU PRO 3
3. Volumetric Real-Time Water and Foam Rendering 129
3.3.5 Volumetric Compositing
The difference between the usual compositing of layers and volumetric composit-
ing is that we take the thickness of each layer into account to attenuate a viewing
ray. Compositing along a viewing ray back to front, we have (see Figure 3.2):
C
wb
= lerp(c
fluid
, C
background
, e
T
wb
)
,
C
foam
= lerp(c
fb
, c
ff
, e
T
f f
),
C
f
= lerp(C
foam
, C
wb
, e
T
f
),
C
wf
= lerp(c
fluid
, C
f
, e
T
wf
),
where c
fluid
is the water color and c
ff
and c
fb
are two user-defined colors that
are blended together to create more freedom in designing the look of the foam.
After attenuation, we calculate highlights at the front ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

GPU Pro 2

GPU Pro 2

Wolfgang Engel
GPU Pro 4

GPU Pro 4

Wolfgang Engel
GPU Pro 5

GPU Pro 5

Wolfgang Engel
GPU Pro 7

GPU Pro 7

Wolfgang Engel

Publisher Resources

ISBN: 9781439887943