Cleanup: Avoid some defines for scene_intersect(), related to Min Width.
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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__
|
||||
|
@@ -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__
|
||||
|
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user