diff options
author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-07-10 03:15:17 -0400 |
---|---|---|
committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-07-10 03:15:17 -0400 |
commit | 842e3a9dfecdd6411b1f27084ab6dcbe92fa32b9 (patch) | |
tree | eacf1304096bfb1d7c6597147bd1479ba84ba2e8 /src/materials.h | |
parent | aa0f12c8b6c6d4e0858d46eba5499d9682ecbe9d (diff) | |
download | chroma-842e3a9dfecdd6411b1f27084ab6dcbe92fa32b9.tar.gz chroma-842e3a9dfecdd6411b1f27084ab6dcbe92fa32b9.tar.bz2 chroma-842e3a9dfecdd6411b1f27084ab6dcbe92fa32b9.zip |
added a hybrid monte carlo ray tracing rendering algorithm
Diffstat (limited to 'src/materials.h')
-rw-r--r-- | src/materials.h | 16 |
1 files changed, 9 insertions, 7 deletions
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" |