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:
authorStefan Werner <stefan.werner@tangent-animation.com>2020-01-15 16:33:16 +0300
committerStefan Werner <stefan@keindesign.de>2020-01-16 22:42:17 +0300
commit6257cdc376af02e93b61073b67ffc0514f8af4ac (patch)
tree1e3377f499793bcdd9495b710118ea8605b29317 /intern/cycles/kernel/bvh/bvh_embree.h
parentb05bca23641fc8760b1c340928654f23ea04c6f2 (diff)
Fix T73064: Embree does not like Bevel shader
Embree's local intersection routine was not prepared for local intersections without per-object BVH. Now it should be able to handle any kind of local intersection, such as AO, bevel and SSS. Differential Revision: https://developer.blender.org/D6602
Diffstat (limited to 'intern/cycles/kernel/bvh/bvh_embree.h')
-rw-r--r--intern/cycles/kernel/bvh/bvh_embree.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/intern/cycles/kernel/bvh/bvh_embree.h b/intern/cycles/kernel/bvh/bvh_embree.h
index 661bba54fd4..ffea7d37440 100644
--- a/intern/cycles/kernel/bvh/bvh_embree.h
+++ b/intern/cycles/kernel/bvh/bvh_embree.h
@@ -28,9 +28,9 @@ struct CCLIntersectContext {
typedef enum {
RAY_REGULAR = 0,
RAY_SHADOW_ALL = 1,
- RAY_SSS = 2,
- RAY_VOLUME_ALL = 3,
-
+ RAY_LOCAL = 2,
+ RAY_SSS = 3,
+ RAY_VOLUME_ALL = 4,
} RayType;
KernelGlobals *kg;
@@ -42,8 +42,8 @@ struct CCLIntersectContext {
int num_hits;
/* for SSS Rays: */
- LocalIntersection *ss_isect;
- int sss_object_id;
+ LocalIntersection *local_isect;
+ int local_object_id;
uint *lcg_state;
CCLIntersectContext(KernelGlobals *kg_, RayType type_)
@@ -53,8 +53,8 @@ struct CCLIntersectContext {
max_hits = 1;
num_hits = 0;
isect_s = NULL;
- ss_isect = NULL;
- sss_object_id = -1;
+ local_isect = NULL;
+ local_object_id = -1;
lcg_state = NULL;
}
};
@@ -121,11 +121,11 @@ ccl_device_inline void kernel_embree_convert_hit(KernelGlobals *kg,
isect->type = kernel_tex_fetch(__prim_type, isect->prim);
}
-ccl_device_inline void kernel_embree_convert_local_hit(KernelGlobals *kg,
- const RTCRay *ray,
- const RTCHit *hit,
- Intersection *isect,
- int local_object_id)
+ccl_device_inline void kernel_embree_convert_sss_hit(KernelGlobals *kg,
+ const RTCRay *ray,
+ const RTCHit *hit,
+ Intersection *isect,
+ int local_object_id)
{
isect->u = 1.0f - hit->v - hit->u;
isect->v = hit->u;