Skip to Content
GPU Pro 7
book

GPU Pro 7

by Wolfgang Engel
March 2016
Intermediate to advanced
320 pages
9h 14m
English
A K Peters/CRC Press
Content preview from GPU Pro 7
122 II Lighting
Figure 4.34. A light ray march for each view ray-march step.
cloud_test = SampleCloudDensity ( p , weather_data ,
mip_level , true );
if( cloud_test == 0.0)
{
p += step ;
}
}
}
This algorithm cuts the number of 3D texture calls in half for the best case,
where we are marching through empty sky.
To calculate the lighting, more samples need to be taken toward the light at
each ray-march step. The sum of these samples is used in the lighting model and
then attenuated by the current sum of density along the view ray for each view
ray-march step. Figure 4.34 illustrates a basic light sample integration march
within a ray march.
Because we are ta
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 4

GPU Pro 4

Wolfgang Engel
GPU Pro 5

GPU Pro 5

Wolfgang Engel
GPU Pro 6

GPU Pro 6

Wolfgang Engel
GPU PRO 3

GPU PRO 3

Wolfgang Engel

Publisher Resources

ISBN: 9781498742542