diff options
author | Thomas Dinges <blender@dingto.org> | 2014-09-24 13:32:29 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2014-09-24 13:32:29 +0400 |
commit | 1b5ec32ed97a60d261e9f39d84791875f9f7d760 (patch) | |
tree | f811ba438a80eddae2a90c695700dcc7d0460418 /intern/cycles/kernel | |
parent | d0bd474375b1301173729e40561011c26626277f (diff) |
Cleanup: Avoid some defines for scene_intersect(), related to Min Width.
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/geom/geom_bvh.h | 7 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_path.h | 8 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_shadow.h | 12 | ||||
-rw-r--r-- | intern/cycles/kernel/osl/osl_services.cpp | 4 |
4 files changed, 4 insertions, 27 deletions
diff --git a/intern/cycles/kernel/geom/geom_bvh.h b/intern/cycles/kernel/geom/geom_bvh.h index dd7c25d581d..dd6abe32fec 100644 --- a/intern/cycles/kernel/geom/geom_bvh.h +++ b/intern/cycles/kernel/geom/geom_bvh.h @@ -129,11 +129,8 @@ ccl_device_inline #else ccl_device_noinline #endif -#ifdef __HAIR__ -bool scene_intersect(KernelGlobals *kg, const Ray *ray, const uint visibility, Intersection *isect, uint *lcg_state, float difl, float extmax) -#else -bool scene_intersect(KernelGlobals *kg, const Ray *ray, const uint visibility, Intersection *isect) -#endif +bool scene_intersect(KernelGlobals *kg, const Ray *ray, const uint visibility, Intersection *isect, + uint *lcg_state, float difl, float extmax) { #ifdef __OBJECT_MOTION__ if(kernel_data.bvh.have_motion) { diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h index 515854b6e9c..8e9fc743694 100644 --- a/intern/cycles/kernel/kernel_path.h +++ b/intern/cycles/kernel/kernel_path.h @@ -55,11 +55,7 @@ ccl_device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, Ray ray, /* intersect scene */ Intersection isect; uint visibility = path_state_ray_visibility(kg, &state); -#ifdef __HAIR__ bool hit = scene_intersect(kg, &ray, visibility, &isect, NULL, 0.0f, 0.0f); -#else - bool hit = scene_intersect(kg, &ray, visibility, &isect); -#endif #ifdef __LAMP_MIS__ if(kernel_data.integrator.use_lamp_mis && !(state.flag & PATH_RAY_CAMERA)) { @@ -445,7 +441,7 @@ ccl_device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, bool hit = scene_intersect(kg, &ray, visibility, &isect, &lcg_state, difl, extmax); #else - bool hit = scene_intersect(kg, &ray, visibility, &isect); + bool hit = scene_intersect(kg, &ray, visibility, &isect, NULL, 0.0f, 0.0f); #endif #ifdef __LAMP_MIS__ @@ -807,7 +803,7 @@ ccl_device float4 kernel_branched_path_integrate(KernelGlobals *kg, RNG *rng, in bool hit = scene_intersect(kg, &ray, visibility, &isect, &lcg_state, difl, extmax); #else - bool hit = scene_intersect(kg, &ray, visibility, &isect); + bool hit = scene_intersect(kg, &ray, visibility, &isect, NULL, 0.0f, 0.0f); #endif #ifdef __VOLUME__ diff --git a/intern/cycles/kernel/kernel_shadow.h b/intern/cycles/kernel/kernel_shadow.h index 439e8bbd585..28abc86cdb1 100644 --- a/intern/cycles/kernel/kernel_shadow.h +++ b/intern/cycles/kernel/kernel_shadow.h @@ -168,11 +168,7 @@ ccl_device_inline bool shadow_blocked(KernelGlobals *kg, PathState *state, Ray * } else { Intersection isect; -#ifdef __HAIR__ blocked = scene_intersect(kg, ray, PATH_RAY_SHADOW_OPAQUE, &isect, NULL, 0.0f, 0.0f); -#else - blocked = scene_intersect(kg, ray, PATH_RAY_SHADOW_OPAQUE, &isect); -#endif } #ifdef __VOLUME__ @@ -203,11 +199,7 @@ ccl_device_inline bool shadow_blocked(KernelGlobals *kg, PathState *state, Ray * return false; Intersection isect; -#ifdef __HAIR__ bool blocked = scene_intersect(kg, ray, PATH_RAY_SHADOW_OPAQUE, &isect, NULL, 0.0f, 0.0f); -#else - bool blocked = scene_intersect(kg, ray, PATH_RAY_SHADOW_OPAQUE, &isect); -#endif #ifdef __TRANSPARENT_SHADOWS__ if(blocked && kernel_data.integrator.transparent_shadows) { @@ -223,11 +215,7 @@ ccl_device_inline bool shadow_blocked(KernelGlobals *kg, PathState *state, Ray * if(bounce >= kernel_data.integrator.transparent_max_bounce) return true; -#ifdef __HAIR__ if(!scene_intersect(kg, ray, PATH_RAY_SHADOW_TRANSPARENT, &isect, NULL, 0.0f, 0.0f)) -#else - if(!scene_intersect(kg, ray, PATH_RAY_SHADOW_TRANSPARENT, &isect)) -#endif { #ifdef __VOLUME__ diff --git a/intern/cycles/kernel/osl/osl_services.cpp b/intern/cycles/kernel/osl/osl_services.cpp index 38cb5061346..1475e5a0a62 100644 --- a/intern/cycles/kernel/osl/osl_services.cpp +++ b/intern/cycles/kernel/osl/osl_services.cpp @@ -1047,11 +1047,7 @@ bool OSLRenderServices::trace(TraceOpt &options, OSL::ShaderGlobals *sg, tracedata->sd.osl_globals = sd->osl_globals; /* raytrace */ -#ifdef __HAIR__ return scene_intersect(sd->osl_globals, &ray, PATH_RAY_ALL_VISIBILITY, &tracedata->isect, NULL, 0.0f, 0.0f); -#else - return scene_intersect(sd->osl_globals, &ray, PATH_RAY_ALL_VISIBILITY, &tracedata->isect); -#endif } |