Cleanup: Avoid some defines for scene_intersect(), related to Min Width.

This commit is contained in:
Thomas Dinges
2014-09-24 11:32:29 +02:00
parent d0bd474375
commit 1b5ec32ed9
4 changed files with 4 additions and 27 deletions

View File

@@ -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) {

View File

@@ -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__

View File

@@ -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__

View File

@@ -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
}