Skip to Content
GPU Pro 5
book

GPU Pro 5

by Wolfgang Engel
May 2014
Intermediate to advanced
522 pages
16h 1m
English
A K Peters/CRC Press
Content preview from GPU Pro 5
40 I Rendering
void gammaton_entry_program ()
{
// initialize payload
Ray ray ; GammaPayload prd ;
prd . ray_index = launch_index + g_SourceRayIndexOffset ;
prd . ray_depth =0; // counts recursions
// get gammaton data ( ping pong)
GammaHitShared& hitshared_i = HitShared_In [ prd . ray_index ];
GammaHitShared& hitshared_o = HitShared_Out [ prd . ray_index ];
// if gammaton is alive , continue the ray
if ( IS_ALIVE( hitshared_i . flags ))
{
// continue from last position
ray . origin = HitOptix [ prd . ray_index ]. position ;
ray . direction = normalize( hitshared_i . velocity);
prd . speed = length( hitshared_i . velocity );
hitshared_o . carriedMaterial =
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 7

GPU Pro 7

Wolfgang Engel
GPU Pro 6

GPU Pro 6

Wolfgang Engel
GPU PRO 3

GPU PRO 3

Wolfgang Engel

Publisher Resources

ISBN: 9781482208641