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>2020-02-09 01:19:59 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-06-04 15:37:20 +0300
commit41866070d3154dcdfc7ff38b6c472f2f6b591c13 (patch)
tree38deace6c6da8623d13fac6b589e56470f27cd46 /intern/cycles
parent953c232db31f1a76f99ceb43119681ce0df1ab17 (diff)
Cleanup: remove unused flag
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/bvh/bvh.cpp5
-rw-r--r--intern/cycles/bvh/bvh8.cpp2
-rw-r--r--intern/cycles/bvh/bvh_build.cpp3
-rw-r--r--intern/cycles/kernel/kernel_types.h9
4 files changed, 7 insertions, 12 deletions
diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp
index e6502a40313..0313bcd68b0 100644
--- a/intern/cycles/bvh/bvh.cpp
+++ b/intern/cycles/bvh/bvh.cpp
@@ -229,8 +229,6 @@ void BVH::refit_primitives(int start, int end, BoundBox &bbox, uint &visibility)
curve.bounds_grow(k, &hair->curve_keys[0], &hair->curve_radius[0], bbox);
- visibility |= PATH_RAY_CURVE;
-
/* Motion curves. */
if (hair->use_motion_blur) {
Attribute *attr = hair->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
@@ -327,9 +325,6 @@ void BVH::pack_primitives()
pack.prim_tri_index[i] = -1;
}
pack.prim_visibility[i] = ob->visibility_for_tracing();
- if (pack.prim_type[i] & PRIMITIVE_ALL_CURVE) {
- pack.prim_visibility[i] |= PATH_RAY_CURVE;
- }
}
else {
pack.prim_tri_index[i] = -1;
diff --git a/intern/cycles/bvh/bvh8.cpp b/intern/cycles/bvh/bvh8.cpp
index 342dd9e85a5..b805865b2c8 100644
--- a/intern/cycles/bvh/bvh8.cpp
+++ b/intern/cycles/bvh/bvh8.cpp
@@ -439,8 +439,6 @@ void BVH8::refit_node(int idx, bool leaf, BoundBox &bbox, uint &visibility)
curve.bounds_grow(k, &hair->curve_keys[0], &hair->curve_radius[0], bbox);
- visibility |= PATH_RAY_CURVE;
-
/* Motion curves. */
if (hair->use_motion_blur) {
Attribute *attr = hair->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp
index db156219f09..814b5ced5d2 100644
--- a/intern/cycles/bvh/bvh_build.cpp
+++ b/intern/cycles/bvh/bvh_build.cpp
@@ -885,9 +885,6 @@ BVHNode *BVHBuild::create_leaf_node(const BVHRange &range, const vector<BVHRefer
bounds[type_index].grow(ref.bounds());
visibility[type_index] |= objects[ref.prim_object()]->visibility_for_tracing();
- if (ref.prim_type() & PRIMITIVE_ALL_CURVE) {
- visibility[type_index] |= PATH_RAY_CURVE;
- }
++num_new_prims;
}
else {
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h
index 630d00a4e71..0a0cf1bd6c0 100644
--- a/intern/cycles/kernel/kernel_types.h
+++ b/intern/cycles/kernel/kernel_types.h
@@ -273,6 +273,7 @@ enum SamplingPattern {
/* these flags values correspond to raytypes in osl.cpp, so keep them in sync! */
enum PathRayFlag {
+ /* Ray visibility. */
PATH_RAY_CAMERA = (1 << 0),
PATH_RAY_REFLECT = (1 << 1),
PATH_RAY_TRANSMIT = (1 << 2),
@@ -281,6 +282,7 @@ enum PathRayFlag {
PATH_RAY_SINGULAR = (1 << 5),
PATH_RAY_TRANSPARENT = (1 << 6),
+ /* Shadow ray visibility. */
PATH_RAY_SHADOW_OPAQUE_NON_CATCHER = (1 << 7),
PATH_RAY_SHADOW_OPAQUE_CATCHER = (1 << 8),
PATH_RAY_SHADOW_OPAQUE = (PATH_RAY_SHADOW_OPAQUE_NON_CATCHER | PATH_RAY_SHADOW_OPAQUE_CATCHER),
@@ -292,8 +294,11 @@ enum PathRayFlag {
PATH_RAY_SHADOW_TRANSPARENT_NON_CATCHER),
PATH_RAY_SHADOW = (PATH_RAY_SHADOW_OPAQUE | PATH_RAY_SHADOW_TRANSPARENT),
- PATH_RAY_CURVE = (1 << 11), /* visibility flag to define curve segments */
- PATH_RAY_VOLUME_SCATTER = (1 << 12), /* volume scattering */
+ /* Unused, free to reuse. */
+ PATH_RAY_UNUSED = (1 << 11),
+
+ /* Ray visibility for volume scattering. */
+ PATH_RAY_VOLUME_SCATTER = (1 << 12),
/* Special flag to tag unaligned BVH nodes. */
PATH_RAY_NODE_UNALIGNED = (1 << 13),