diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-12-20 04:52:56 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-12-20 16:14:43 +0300 |
commit | e2e7f7ea529e352e34c6bed8e9cbf1fa0975f3e8 (patch) | |
tree | a1345c27bf0d4300020f2278487d7bb98208298a /intern/cycles/kernel/svm/bevel.h | |
parent | 5adc06d2d89819522a355cec6bd3022e1b2f41d3 (diff) |
Fix Cycles OptiX crash with 3D curves after point cloud changes
Includes refactoring to reduce the number of bits taken by primitive types,
so they more easily fit in the OptiX limit.
Diffstat (limited to 'intern/cycles/kernel/svm/bevel.h')
-rw-r--r-- | intern/cycles/kernel/svm/bevel.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/svm/bevel.h b/intern/cycles/kernel/svm/bevel.h index 6799489514f..46dfb6631da 100644 --- a/intern/cycles/kernel/svm/bevel.h +++ b/intern/cycles/kernel/svm/bevel.h @@ -206,12 +206,12 @@ ccl_device float3 svm_bevel( for (int hit = 0; hit < num_eval_hits; hit++) { /* Quickly retrieve P and Ng without setting up ShaderData. */ float3 hit_P; - if (sd->type & PRIMITIVE_TRIANGLE) { + if (sd->type == PRIMITIVE_TRIANGLE) { hit_P = triangle_refine_local( kg, sd, ray.P, ray.D, ray.t, isect.hits[hit].object, isect.hits[hit].prim); } # ifdef __OBJECT_MOTION__ - else if (sd->type & PRIMITIVE_MOTION_TRIANGLE) { + else if (sd->type == PRIMITIVE_MOTION_TRIANGLE) { float3 verts[3]; motion_triangle_vertices(kg, sd->object, isect.hits[hit].prim, sd->time, verts); hit_P = motion_triangle_refine_local( @@ -236,11 +236,11 @@ ccl_device float3 svm_bevel( float u = isect.hits[hit].u; float v = isect.hits[hit].v; - if (sd->type & PRIMITIVE_TRIANGLE) { + if (sd->type == PRIMITIVE_TRIANGLE) { N = triangle_smooth_normal(kg, N, prim, u, v); } # ifdef __OBJECT_MOTION__ - else if (sd->type & PRIMITIVE_MOTION_TRIANGLE) { + else if (sd->type == PRIMITIVE_MOTION_TRIANGLE) { N = motion_triangle_smooth_normal(kg, N, sd->object, prim, u, v, sd->time); } # endif /* __OBJECT_MOTION__ */ |