[Bf-blender-cvs] [65f279b] master: Cycles: Fix wrong camera in volume check when domain is only visible to camera rays
Sergey Sharybin
noreply at git.blender.org
Mon Apr 4 19:31:09 CEST 2016
Commit: 65f279b7705a14ffdbd79f1835504344af40c283
Author: Sergey Sharybin
Date: Mon Apr 4 19:30:38 2016 +0200
Branches: master
https://developer.blender.org/rB65f279b7705a14ffdbd79f1835504344af40c283
Cycles: Fix wrong camera in volume check when domain is only visible to camera rays
===================================================================
M intern/cycles/kernel/geom/geom_bvh.h
M intern/cycles/kernel/geom/geom_bvh_volume.h
M intern/cycles/kernel/geom/geom_bvh_volume_all.h
M intern/cycles/kernel/geom/geom_qbvh_volume.h
M intern/cycles/kernel/geom/geom_qbvh_volume_all.h
M intern/cycles/kernel/kernel_volume.h
===================================================================
diff --git a/intern/cycles/kernel/geom/geom_bvh.h b/intern/cycles/kernel/geom/geom_bvh.h
index e5cd7b7..f480af6 100644
--- a/intern/cycles/kernel/geom/geom_bvh.h
+++ b/intern/cycles/kernel/geom/geom_bvh.h
@@ -299,38 +299,39 @@ ccl_device_intersect bool scene_intersect_shadow_all(KernelGlobals *kg, const Ra
#ifdef __VOLUME__
ccl_device_intersect bool scene_intersect_volume(KernelGlobals *kg,
const Ray *ray,
- Intersection *isect)
+ Intersection *isect,
+ const uint visibility)
{
# ifdef __OBJECT_MOTION__
if(kernel_data.bvh.have_motion) {
# ifdef __HAIR__
if(kernel_data.bvh.have_curves)
- return bvh_intersect_volume_hair_motion(kg, ray, isect);
+ return bvh_intersect_volume_hair_motion(kg, ray, isect, visibility);
# endif /* __HAIR__ */
- return bvh_intersect_volume_motion(kg, ray, isect);
+ return bvh_intersect_volume_motion(kg, ray, isect, visibility);
}
# endif /* __OBJECT_MOTION__ */
# ifdef __HAIR__
if(kernel_data.bvh.have_curves)
- return bvh_intersect_volume_hair(kg, ray, isect);
+ return bvh_intersect_volume_hair(kg, ray, isect, visibility);
# endif /* __HAIR__ */
# ifdef __KERNEL_CPU__
# ifdef __INSTANCING__
if(kernel_data.bvh.have_instancing)
- return bvh_intersect_volume_instancing(kg, ray, isect);
+ return bvh_intersect_volume_instancing(kg, ray, isect, visibility);
# endif /* __INSTANCING__ */
- return bvh_intersect_volume(kg, ray, isect);
+ return bvh_intersect_volume(kg, ray, isect, visibility);
# else /* __KERNEL_CPU__ */
# ifdef __INSTANCING__
- return bvh_intersect_volume_instancing(kg, ray, isect);
+ return bvh_intersect_volume_instancing(kg, ray, isect, visibility);
# else
- return bvh_intersect_volume(kg, ray, isect);
+ return bvh_intersect_volume(kg, ray, isect, visibility);
# endif /* __INSTANCING__ */
# endif /* __KERNEL_CPU__ */
@@ -341,30 +342,31 @@ ccl_device_intersect bool scene_intersect_volume(KernelGlobals *kg,
ccl_device_intersect uint scene_intersect_volume_all(KernelGlobals *kg,
const Ray *ray,
Intersection *isect,
- const uint max_hits)
+ const uint max_hits,
+ const uint visibility)
{
# ifdef __OBJECT_MOTION__
if(kernel_data.bvh.have_motion) {
# ifdef __HAIR__
if(kernel_data.bvh.have_curves)
- return bvh_intersect_volume_all_hair_motion(kg, ray, isect, max_hits);
+ return bvh_intersect_volume_all_hair_motion(kg, ray, isect, max_hits, visibility);
# endif /* __HAIR__ */
- return bvh_intersect_volume_all_motion(kg, ray, isect, max_hits);
+ return bvh_intersect_volume_all_motion(kg, ray, isect, max_hits, visibility);
}
# endif /* __OBJECT_MOTION__ */
# ifdef __HAIR__
if(kernel_data.bvh.have_curves)
- return bvh_intersect_volume_all_hair(kg, ray, isect, max_hits);
+ return bvh_intersect_volume_all_hair(kg, ray, isect, max_hits, visibility);
# endif /* __HAIR__ */
# ifdef __INSTANCING__
if(kernel_data.bvh.have_instancing)
- return bvh_intersect_volume_all_instancing(kg, ray, isect, max_hits);
+ return bvh_intersect_volume_all_instancing(kg, ray, isect, max_hits, visibility);
# endif /* __INSTANCING__ */
- return bvh_intersect_volume_all(kg, ray, isect, max_hits);
+ return bvh_intersect_volume_all(kg, ray, isect, max_hits, visibility);
}
#endif /* __VOLUME_RECORD_ALL__ */
diff --git a/intern/cycles/kernel/geom/geom_bvh_volume.h b/intern/cycles/kernel/geom/geom_bvh_volume.h
index 937a5d4..14ab6e6 100644
--- a/intern/cycles/kernel/geom/geom_bvh_volume.h
+++ b/intern/cycles/kernel/geom/geom_bvh_volume.h
@@ -33,7 +33,8 @@
ccl_device bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
const Ray *ray,
- Intersection *isect)
+ Intersection *isect,
+ const uint visibility)
{
/* todo:
* - test if pushing distance on the stack helps (for non shadow rays)
@@ -56,8 +57,6 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
float3 idir = bvh_inverse_direction(dir);
int object = OBJECT_NONE;
- const uint visibility = PATH_RAY_ALL_VISIBILITY;
-
#if BVH_FEATURE(BVH_MOTION)
Transform ob_itfm;
#endif
@@ -336,13 +335,15 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
ccl_device_inline bool BVH_FUNCTION_NAME(KernelGlobals *kg,
const Ray *ray,
- Intersection *isect)
+ Intersection *isect,
+ const uint visibility)
{
#ifdef __QBVH__
if(kernel_data.bvh.use_qbvh) {
return BVH_FUNCTION_FULL_NAME(QBVH)(kg,
ray,
- isect);
+ isect,
+ visibility);
}
else
#endif
@@ -350,7 +351,8 @@ ccl_device_inline bool BVH_FUNCTION_NAME(KernelGlobals *kg,
kernel_assert(kernel_data.bvh.use_qbvh == false);
return BVH_FUNCTION_FULL_NAME(BVH)(kg,
ray,
- isect);
+ isect,
+ visibility);
}
}
diff --git a/intern/cycles/kernel/geom/geom_bvh_volume_all.h b/intern/cycles/kernel/geom/geom_bvh_volume_all.h
index 6b0b201..b16eb39 100644
--- a/intern/cycles/kernel/geom/geom_bvh_volume_all.h
+++ b/intern/cycles/kernel/geom/geom_bvh_volume_all.h
@@ -34,7 +34,8 @@
ccl_device uint BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
const Ray *ray,
Intersection *isect_array,
- const uint max_hits)
+ const uint max_hits,
+ const uint visibility)
{
/* todo:
* - test if pushing distance on the stack helps (for non shadow rays)
@@ -59,8 +60,6 @@ ccl_device uint BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
int object = OBJECT_NONE;
float isect_t = tmax;
- const uint visibility = PATH_RAY_ALL_VISIBILITY;
-
#if BVH_FEATURE(BVH_MOTION)
Transform ob_itfm;
#endif
@@ -430,14 +429,16 @@ ccl_device uint BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
ccl_device_inline uint BVH_FUNCTION_NAME(KernelGlobals *kg,
const Ray *ray,
Intersection *isect_array,
- const uint max_hits)
+ const uint max_hits,
+ const uint visibility)
{
#ifdef __QBVH__
if(kernel_data.bvh.use_qbvh) {
return BVH_FUNCTION_FULL_NAME(QBVH)(kg,
ray,
isect_array,
- max_hits);
+ max_hits,
+ visibility);
}
else
#endif
@@ -446,7 +447,8 @@ ccl_device_inline uint BVH_FUNCTION_NAME(KernelGlobals *kg,
return BVH_FUNCTION_FULL_NAME(BVH)(kg,
ray,
isect_array,
- max_hits);
+ max_hits,
+ visibility);
}
}
diff --git a/intern/cycles/kernel/geom/geom_qbvh_volume.h b/intern/cycles/kernel/geom/geom_qbvh_volume.h
index 696a48a..36648fd 100644
--- a/intern/cycles/kernel/geom/geom_qbvh_volume.h
+++ b/intern/cycles/kernel/geom/geom_qbvh_volume.h
@@ -29,7 +29,8 @@
ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
const Ray *ray,
- Intersection *isect)
+ Intersection *isect,
+ const uint visibility)
{
/* TODO(sergey):
* - Test if pushing distance on the stack helps.
@@ -51,8 +52,6 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
float3 idir = bvh_inverse_direction(dir);
int object = OBJECT_NONE;
- const uint visibility = PATH_RAY_ALL_VISIBILITY;
-
#if BVH_FEATURE(BVH_MOTION)
Transform ob_itfm;
#endif
diff --git a/intern/cycles/kernel/geom/geom_qbvh_volume_all.h b/intern/cycles/kernel/geom/geom_qbvh_volume_all.h
index 2cef0dc..2cf78f2 100644
--- a/intern/cycles/kernel/geom/geom_qbvh_volume_all.h
+++ b/intern/cycles/kernel/geom/geom_qbvh_volume_all.h
@@ -30,7 +30,8 @@
ccl_device uint BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
const Ray *ray,
Intersection *isect_array,
- const uint max_hits)
+ const uint max_hits,
+ const uint visibility)
{
/* TODO(sergey):
* - Test if pushing distance on the stack helps.
@@ -54,8 +55,6 @@ ccl_device uint BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
int object = OBJECT_NONE;
float isect_t = tmax;
- const uint visibility = PATH_RAY_ALL_VISIBILITY;
-
#if BVH_FEATURE(BVH_MOTION)
Transform ob_itfm;
#endif
diff --git a/intern/cycles/kernel/kernel_volume.h b/intern/cycles/kernel/kernel_volume.h
index 1dc2c5f..86a3adb 100644
--- a/intern/cycles/kernel/kernel_volume.h
+++ b/intern/cycles/kernel/kernel_volume.h
@@ -994,12 +994,14 @@ ccl_device void kernel_volume_stack_init(KernelGlobals *kg,
int stack_index = 0, enclosed_index = 0;
+ const uint visibility = PATH_RAY_
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list