From 842e3a9dfecdd6411b1f27084ab6dcbe92fa32b9 Mon Sep 17 00:00:00 2001 From: Anthony LaTorre Date: Sun, 10 Jul 2011 03:15:17 -0400 Subject: added a hybrid monte carlo ray tracing rendering algorithm --- src/materials.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/materials.h') diff --git a/src/materials.h b/src/materials.h index 6115396..2355d24 100644 --- a/src/materials.h +++ b/src/materials.h @@ -15,9 +15,10 @@ struct Material struct Surface { - float *absorption; - float *reflection_diffuse; - float *reflection_specular; + float *detect; + float *absorb; + float *reflect_diffuse; + float *reflect_specular; }; __device__ Material materials[20]; @@ -54,11 +55,12 @@ __global__ void set_material(int material_index, float *refractive_index, float materials[material_index].scattering_length = scattering_length; } -__global__ void set_surface(int surface_index, float *absorption, float *reflection_diffuse, float *reflection_specular) +__global__ void set_surface(int surface_index, float *detect, float *absorb, float *reflect_diffuse, float *reflect_specular) { - surfaces[surface_index].absorption = absorption; - surfaces[surface_index].reflection_diffuse = reflection_diffuse; - surfaces[surface_index].reflection_specular = reflection_specular; + surfaces[surface_index].detect = detect; + surfaces[surface_index].absorb = absorb; + surfaces[surface_index].reflect_diffuse = reflect_diffuse; + surfaces[surface_index].reflect_specular = reflect_specular; } } // extern "c" -- cgit