Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2014-03-29 16:03:47 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-03-29 16:03:47 +0400
commite8b1cfed0a3afbf69b5bd5a7e0a51381622e844f (patch)
tree8416fab6524a7041edf5dc95539ce1973092f9e9 /intern/cycles/kernel/kernel_emission.h
parent6997908afc38a3c98d09939f3b46f10d7a165d2e (diff)
Cycles code refactor: replace magic ~0 values in the code with defines.
Diffstat (limited to 'intern/cycles/kernel/kernel_emission.h')
-rw-r--r--intern/cycles/kernel/kernel_emission.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/kernel_emission.h b/intern/cycles/kernel/kernel_emission.h
index 44c2572efc2..bb61b2111fe 100644
--- a/intern/cycles/kernel/kernel_emission.h
+++ b/intern/cycles/kernel/kernel_emission.h
@@ -70,7 +70,7 @@ ccl_device_noinline bool direct_emission(KernelGlobals *kg, ShaderData *sd, int
LightSample ls;
#ifdef __BRANCHED_PATH__
- if(lindex != -1) {
+ if(lindex != LAMP_NONE) {
/* sample position on a specified light */
light_select(kg, lindex, randu, randv, sd->P, &ls);
}
@@ -97,7 +97,7 @@ ccl_device_noinline bool direct_emission(KernelGlobals *kg, ShaderData *sd, int
float bsdf_pdf;
#ifdef __VOLUME__
- if(sd->prim != ~0)
+ if(sd->prim != PRIM_NONE)
shader_bsdf_eval(kg, sd, ls.D, eval, &bsdf_pdf);
else
shader_volume_phase_eval(kg, sd, ls.D, eval, &bsdf_pdf);
@@ -153,7 +153,7 @@ ccl_device_noinline bool direct_emission(KernelGlobals *kg, ShaderData *sd, int
}
/* return if it's a lamp for shadow pass */
- *is_lamp = (ls.prim == ~0 && ls.type != LIGHT_BACKGROUND);
+ *is_lamp = (ls.prim == PRIM_NONE && ls.type != LIGHT_BACKGROUND);
return true;
}
@@ -188,7 +188,7 @@ ccl_device_noinline bool indirect_lamp_emission(KernelGlobals *kg, Ray *ray, int
LightSample ls;
int lamp = lamp_light_eval_sample(kg, randt);
- if(lamp == ~0)
+ if(lamp == LAMP_NONE)
return false;
if(!lamp_light_eval(kg, lamp, ray->P, ray->D, ray->t, &ls))