
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 =