Skip to content

Commit dce6269

Browse files
brechtvlBrecht Van Lommel
authored andcommitted
Fix #143714: Cycles OptiX fails to render linear and ribbon curves together
This case was not accounted for previously, but is now possible when the new curves object has curves with type poly. Pull Request: https://projects.blender.org/blender/blender/pulls/144087
1 parent 91e0814 commit dce6269

File tree

8 files changed

+150
-78
lines changed

8 files changed

+150
-78
lines changed

intern/cycles/blender/curves.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,8 @@ void BlenderSync::sync_particle_hair(
675675
}
676676
}
677677
}
678+
679+
hair->curve_shape = scene->params.hair_shape;
678680
}
679681

680682
template<typename TypeInCycles, typename GetValueAtIndex>
@@ -1035,6 +1037,9 @@ void BlenderSync::sync_hair(Hair *hair, BObjectInfo &b_ob_info, bool motion, con
10351037
if (!b_types.is_empty() && b_types[0] == CURVE_TYPE_POLY) {
10361038
hair->curve_shape = CURVE_THICK_LINEAR;
10371039
}
1040+
else {
1041+
hair->curve_shape = scene->params.hair_shape;
1042+
}
10381043
}
10391044

10401045
void BlenderSync::sync_hair(BObjectInfo &b_ob_info, Hair *hair)

intern/cycles/blender/sync.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ class BlenderSync {
246246
bool use_adaptive_subdivision = false;
247247
bool use_developer_ui;
248248

249+
CurveShapeType curve_shape = CURVE_RIBBON;
250+
249251
float dicing_rate;
250252
int max_subdivisions;
251253

intern/cycles/device/optix/device_impl.cpp

Lines changed: 106 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -349,16 +349,11 @@ bool OptiXDevice::load_kernels(const uint kernel_features)
349349
pipeline_options.pipelineLaunchParamsVariableName = "kernel_params"; /* See globals.h */
350350

351351
pipeline_options.usesPrimitiveTypeFlags = OPTIX_PRIMITIVE_TYPE_FLAGS_TRIANGLE;
352-
if (kernel_features & KERNEL_FEATURE_HAIR) {
353-
if (kernel_features & KERNEL_FEATURE_HAIR_THICK) {
354-
pipeline_options.usesPrimitiveTypeFlags |= OPTIX_PRIMITIVE_TYPE_FLAGS_ROUND_LINEAR |
355-
OPTIX_PRIMITIVE_TYPE_FLAGS_ROUND_CATMULLROM;
356-
}
357-
else {
358-
pipeline_options.usesPrimitiveTypeFlags |= OPTIX_PRIMITIVE_TYPE_FLAGS_CUSTOM;
359-
}
352+
if (kernel_features & KERNEL_FEATURE_HAIR_THICK) {
353+
pipeline_options.usesPrimitiveTypeFlags |= OPTIX_PRIMITIVE_TYPE_FLAGS_ROUND_LINEAR |
354+
OPTIX_PRIMITIVE_TYPE_FLAGS_ROUND_CATMULLROM;
360355
}
361-
if (kernel_features & KERNEL_FEATURE_POINTCLOUD) {
356+
if (kernel_features & (KERNEL_FEATURE_HAIR_RIBBON | KERNEL_FEATURE_POINTCLOUD)) {
362357
pipeline_options.usesPrimitiveTypeFlags |= OPTIX_PRIMITIVE_TYPE_FLAGS_CUSTOM;
363358
}
364359

@@ -435,68 +430,84 @@ bool OptiXDevice::load_kernels(const uint kernel_features)
435430
group_descs[PG_HITV].hitgroup.moduleAH = optix_module;
436431
group_descs[PG_HITV].hitgroup.entryFunctionNameAH = "__anyhit__kernel_optix_volume_test";
437432

438-
if (kernel_features & KERNEL_FEATURE_HAIR) {
439-
if (kernel_features & KERNEL_FEATURE_HAIR_THICK) {
440-
/* Built-in thick curve intersection. */
441-
OptixBuiltinISOptions builtin_options = {};
442-
builtin_options.builtinISModuleType = OPTIX_PRIMITIVE_TYPE_ROUND_CATMULLROM;
443-
builtin_options.buildFlags = OPTIX_BUILD_FLAG_PREFER_FAST_TRACE |
444-
OPTIX_BUILD_FLAG_ALLOW_COMPACTION |
445-
OPTIX_BUILD_FLAG_ALLOW_UPDATE;
446-
builtin_options.curveEndcapFlags = OPTIX_CURVE_ENDCAP_DEFAULT; /* Disable end-caps. */
447-
builtin_options.usesMotionBlur = false;
433+
OptixProgramGroupDesc ignore_desc = {};
434+
ignore_desc.kind = OPTIX_PROGRAM_GROUP_KIND_HITGROUP;
435+
ignore_desc.hitgroup.moduleCH = optix_module;
436+
ignore_desc.hitgroup.entryFunctionNameCH = "__closesthit__kernel_optix_ignore";
437+
ignore_desc.hitgroup.moduleAH = optix_module;
438+
ignore_desc.hitgroup.entryFunctionNameAH = "__anyhit__kernel_optix_ignore";
439+
440+
if (kernel_features & KERNEL_FEATURE_HAIR_THICK) {
441+
/* Built-in thick curve intersection. */
442+
OptixBuiltinISOptions builtin_options = {};
443+
builtin_options.builtinISModuleType = OPTIX_PRIMITIVE_TYPE_ROUND_CATMULLROM;
444+
builtin_options.buildFlags = OPTIX_BUILD_FLAG_PREFER_FAST_TRACE |
445+
OPTIX_BUILD_FLAG_ALLOW_COMPACTION | OPTIX_BUILD_FLAG_ALLOW_UPDATE;
446+
builtin_options.curveEndcapFlags = OPTIX_CURVE_ENDCAP_DEFAULT; /* Disable end-caps. */
447+
builtin_options.usesMotionBlur = false;
448+
449+
optix_assert(optixBuiltinISModuleGet(
450+
context, &module_options, &pipeline_options, &builtin_options, &builtin_modules[0]));
451+
452+
group_descs[PG_HITD].hitgroup.moduleIS = builtin_modules[0];
453+
group_descs[PG_HITD].hitgroup.entryFunctionNameIS = nullptr;
454+
group_descs[PG_HITS].hitgroup.moduleIS = builtin_modules[0];
455+
group_descs[PG_HITS].hitgroup.entryFunctionNameIS = nullptr;
456+
457+
if (pipeline_options.usesMotionBlur) {
458+
builtin_options.usesMotionBlur = true;
448459

449460
optix_assert(optixBuiltinISModuleGet(
450-
context, &module_options, &pipeline_options, &builtin_options, &builtin_modules[0]));
461+
context, &module_options, &pipeline_options, &builtin_options, &builtin_modules[1]));
451462

452-
group_descs[PG_HITD].hitgroup.moduleIS = builtin_modules[0];
453-
group_descs[PG_HITD].hitgroup.entryFunctionNameIS = nullptr;
454-
group_descs[PG_HITS].hitgroup.moduleIS = builtin_modules[0];
455-
group_descs[PG_HITS].hitgroup.entryFunctionNameIS = nullptr;
463+
group_descs[PG_HITD_MOTION] = group_descs[PG_HITD];
464+
group_descs[PG_HITD_MOTION].hitgroup.moduleIS = builtin_modules[1];
465+
group_descs[PG_HITS_MOTION] = group_descs[PG_HITS];
466+
group_descs[PG_HITS_MOTION].hitgroup.moduleIS = builtin_modules[1];
467+
}
456468

457-
if (pipeline_options.usesMotionBlur) {
458-
builtin_options.usesMotionBlur = true;
469+
builtin_options.builtinISModuleType = OPTIX_PRIMITIVE_TYPE_ROUND_LINEAR;
470+
builtin_options.usesMotionBlur = false;
459471

460-
optix_assert(optixBuiltinISModuleGet(
461-
context, &module_options, &pipeline_options, &builtin_options, &builtin_modules[1]));
472+
optix_assert(optixBuiltinISModuleGet(
473+
context, &module_options, &pipeline_options, &builtin_options, &builtin_modules[2]));
462474

463-
group_descs[PG_HITD_MOTION] = group_descs[PG_HITD];
464-
group_descs[PG_HITD_MOTION].hitgroup.moduleIS = builtin_modules[1];
465-
group_descs[PG_HITS_MOTION] = group_descs[PG_HITS];
466-
group_descs[PG_HITS_MOTION].hitgroup.moduleIS = builtin_modules[1];
467-
}
475+
group_descs[PG_HITD_CURVE_LINEAR] = group_descs[PG_HITD];
476+
group_descs[PG_HITD_CURVE_LINEAR].hitgroup.moduleIS = builtin_modules[2];
477+
group_descs[PG_HITS_CURVE_LINEAR] = group_descs[PG_HITS];
478+
group_descs[PG_HITS_CURVE_LINEAR].hitgroup.moduleIS = builtin_modules[2];
479+
group_descs[PG_HITV_CURVE_LINEAR] = ignore_desc;
480+
group_descs[PG_HITL_CURVE_LINEAR] = ignore_desc;
468481

469-
builtin_options.builtinISModuleType = OPTIX_PRIMITIVE_TYPE_ROUND_LINEAR;
470-
builtin_options.usesMotionBlur = false;
482+
if (pipeline_options.usesMotionBlur) {
483+
builtin_options.usesMotionBlur = true;
471484

472485
optix_assert(optixBuiltinISModuleGet(
473-
context, &module_options, &pipeline_options, &builtin_options, &builtin_modules[2]));
474-
475-
group_descs[PG_HITD_CURVE_LINEAR] = group_descs[PG_HITD];
476-
group_descs[PG_HITD_CURVE_LINEAR].hitgroup.moduleIS = builtin_modules[2];
477-
group_descs[PG_HITS_CURVE_LINEAR] = group_descs[PG_HITS];
478-
group_descs[PG_HITS_CURVE_LINEAR].hitgroup.moduleIS = builtin_modules[2];
479-
480-
if (pipeline_options.usesMotionBlur) {
481-
builtin_options.usesMotionBlur = true;
482-
483-
optix_assert(optixBuiltinISModuleGet(
484-
context, &module_options, &pipeline_options, &builtin_options, &builtin_modules[3]));
485-
486-
group_descs[PG_HITD_CURVE_LINEAR_MOTION] = group_descs[PG_HITD_CURVE_LINEAR];
487-
group_descs[PG_HITD_CURVE_LINEAR_MOTION].hitgroup.moduleIS = builtin_modules[3];
488-
group_descs[PG_HITS_CURVE_LINEAR_MOTION] = group_descs[PG_HITS_CURVE_LINEAR];
489-
group_descs[PG_HITS_CURVE_LINEAR_MOTION].hitgroup.moduleIS = builtin_modules[3];
490-
}
491-
}
492-
else {
493-
/* Custom ribbon intersection. */
494-
group_descs[PG_HITD].hitgroup.moduleIS = optix_module;
495-
group_descs[PG_HITS].hitgroup.moduleIS = optix_module;
496-
group_descs[PG_HITD].hitgroup.entryFunctionNameIS = "__intersection__curve_ribbon";
497-
group_descs[PG_HITS].hitgroup.entryFunctionNameIS = "__intersection__curve_ribbon";
486+
context, &module_options, &pipeline_options, &builtin_options, &builtin_modules[3]));
487+
488+
group_descs[PG_HITD_CURVE_LINEAR_MOTION] = group_descs[PG_HITD_CURVE_LINEAR];
489+
group_descs[PG_HITD_CURVE_LINEAR_MOTION].hitgroup.moduleIS = builtin_modules[3];
490+
group_descs[PG_HITS_CURVE_LINEAR_MOTION] = group_descs[PG_HITS_CURVE_LINEAR];
491+
group_descs[PG_HITS_CURVE_LINEAR_MOTION].hitgroup.moduleIS = builtin_modules[3];
492+
group_descs[PG_HITV_CURVE_LINEAR_MOTION] = ignore_desc;
493+
group_descs[PG_HITL_CURVE_LINEAR_MOTION] = ignore_desc;
498494
}
499495
}
496+
if (kernel_features & KERNEL_FEATURE_HAIR_RIBBON) {
497+
/* Custom ribbon intersection. */
498+
group_descs[PG_HITD_CURVE_RIBBON] = group_descs[PG_HITD];
499+
group_descs[PG_HITD_CURVE_RIBBON].kind = OPTIX_PROGRAM_GROUP_KIND_HITGROUP;
500+
group_descs[PG_HITD_CURVE_RIBBON].hitgroup.moduleIS = optix_module;
501+
group_descs[PG_HITD_CURVE_RIBBON].hitgroup.entryFunctionNameIS =
502+
"__intersection__curve_ribbon";
503+
group_descs[PG_HITS_CURVE_RIBBON] = group_descs[PG_HITS];
504+
group_descs[PG_HITS_CURVE_RIBBON].kind = OPTIX_PROGRAM_GROUP_KIND_HITGROUP;
505+
group_descs[PG_HITS_CURVE_RIBBON].hitgroup.moduleIS = optix_module;
506+
group_descs[PG_HITS_CURVE_RIBBON].hitgroup.entryFunctionNameIS =
507+
"__intersection__curve_ribbon";
508+
group_descs[PG_HITV_CURVE_RIBBON] = ignore_desc;
509+
group_descs[PG_HITL_CURVE_RIBBON] = ignore_desc;
510+
}
500511

501512
if (kernel_features & KERNEL_FEATURE_POINTCLOUD) {
502513
group_descs[PG_HITD_POINTCLOUD] = group_descs[PG_HITD];
@@ -507,6 +518,8 @@ bool OptiXDevice::load_kernels(const uint kernel_features)
507518
group_descs[PG_HITS_POINTCLOUD].kind = OPTIX_PROGRAM_GROUP_KIND_HITGROUP;
508519
group_descs[PG_HITS_POINTCLOUD].hitgroup.moduleIS = optix_module;
509520
group_descs[PG_HITS_POINTCLOUD].hitgroup.entryFunctionNameIS = "__intersection__point";
521+
group_descs[PG_HITV_POINTCLOUD] = ignore_desc;
522+
group_descs[PG_HITL_POINTCLOUD] = ignore_desc;
510523
}
511524

512525
/* Add hit group for local intersections. */
@@ -647,6 +660,10 @@ bool OptiXDevice::load_kernels(const uint kernel_features)
647660
trace_css = std::max(trace_css,
648661
stack_size[PG_HITS_CURVE_LINEAR_MOTION].cssIS +
649662
stack_size[PG_HITS_CURVE_LINEAR_MOTION].cssAH);
663+
trace_css = std::max(
664+
trace_css, stack_size[PG_HITD_CURVE_RIBBON].cssIS + stack_size[PG_HITD_CURVE_RIBBON].cssAH);
665+
trace_css = std::max(
666+
trace_css, stack_size[PG_HITS_CURVE_RIBBON].cssIS + stack_size[PG_HITS_CURVE_RIBBON].cssAH);
650667
trace_css = std::max(
651668
trace_css, stack_size[PG_HITD_POINTCLOUD].cssIS + stack_size[PG_HITD_POINTCLOUD].cssAH);
652669
trace_css = std::max(
@@ -678,18 +695,32 @@ bool OptiXDevice::load_kernels(const uint kernel_features)
678695
if (pipeline_options.usesMotionBlur) {
679696
pipeline_groups.push_back(groups[PG_HITD_MOTION]);
680697
pipeline_groups.push_back(groups[PG_HITS_MOTION]);
698+
pipeline_groups.push_back(groups[PG_HITV_MOTION]);
699+
pipeline_groups.push_back(groups[PG_HITL_MOTION]);
681700
}
682701
if (kernel_features & KERNEL_FEATURE_HAIR_THICK) {
683702
pipeline_groups.push_back(groups[PG_HITD_CURVE_LINEAR]);
684703
pipeline_groups.push_back(groups[PG_HITS_CURVE_LINEAR]);
704+
pipeline_groups.push_back(groups[PG_HITV_CURVE_LINEAR]);
705+
pipeline_groups.push_back(groups[PG_HITL_CURVE_LINEAR]);
685706
if (pipeline_options.usesMotionBlur) {
686707
pipeline_groups.push_back(groups[PG_HITD_CURVE_LINEAR_MOTION]);
687708
pipeline_groups.push_back(groups[PG_HITS_CURVE_LINEAR_MOTION]);
709+
pipeline_groups.push_back(groups[PG_HITV_CURVE_LINEAR_MOTION]);
710+
pipeline_groups.push_back(groups[PG_HITL_CURVE_LINEAR_MOTION]);
688711
}
689712
}
713+
if (kernel_features & KERNEL_FEATURE_HAIR_RIBBON) {
714+
pipeline_groups.push_back(groups[PG_HITD_CURVE_RIBBON]);
715+
pipeline_groups.push_back(groups[PG_HITS_CURVE_RIBBON]);
716+
pipeline_groups.push_back(groups[PG_HITV_CURVE_RIBBON]);
717+
pipeline_groups.push_back(groups[PG_HITL_CURVE_RIBBON]);
718+
}
690719
if (kernel_features & KERNEL_FEATURE_POINTCLOUD) {
691720
pipeline_groups.push_back(groups[PG_HITD_POINTCLOUD]);
692721
pipeline_groups.push_back(groups[PG_HITS_POINTCLOUD]);
722+
pipeline_groups.push_back(groups[PG_HITV_POINTCLOUD]);
723+
pipeline_groups.push_back(groups[PG_HITL_POINTCLOUD]);
693724
}
694725

695726
optix_assert(optixPipelineCreate(context,
@@ -738,6 +769,10 @@ bool OptiXDevice::load_kernels(const uint kernel_features)
738769
pipeline_groups.push_back(groups[PG_HITS_CURVE_LINEAR_MOTION]);
739770
}
740771
}
772+
if (kernel_features & KERNEL_FEATURE_HAIR_RIBBON) {
773+
pipeline_groups.push_back(groups[PG_HITD_CURVE_RIBBON]);
774+
pipeline_groups.push_back(groups[PG_HITS_CURVE_RIBBON]);
775+
}
741776
if (kernel_features & KERNEL_FEATURE_POINTCLOUD) {
742777
pipeline_groups.push_back(groups[PG_HITD_POINTCLOUD]);
743778
pipeline_groups.push_back(groups[PG_HITS_POINTCLOUD]);
@@ -1671,17 +1706,22 @@ void OptiXDevice::build_bvh(BVH *bvh, Progress &progress, bool refit)
16711706
instance.visibilityMask = 0xFF;
16721707
}
16731708

1674-
if (ob->get_geometry()->is_hair() &&
1675-
static_cast<const Hair *>(ob->get_geometry())->curve_shape != CURVE_RIBBON)
1676-
{
1677-
if (static_cast<const Hair *>(ob->get_geometry())->curve_shape == CURVE_THICK_LINEAR) {
1709+
if (ob->get_geometry()->is_hair()) {
1710+
const Hair *hair = static_cast<const Hair *>(ob->get_geometry());
1711+
if (hair->curve_shape == CURVE_RIBBON) {
1712+
instance.sbtOffset = PG_HITD_CURVE_RIBBON - PG_HITD;
1713+
1714+
/* Also skip curve ribbons in local trace calls. */
1715+
instance.visibilityMask |= 4;
1716+
}
1717+
else if (hair->curve_shape == CURVE_THICK_LINEAR) {
16781718
instance.sbtOffset = PG_HITD_CURVE_LINEAR - PG_HITD;
1679-
if (pipeline_options.usesMotionBlur && ob->get_geometry()->has_motion_blur()) {
1719+
if (pipeline_options.usesMotionBlur && hair->has_motion_blur()) {
16801720
instance.sbtOffset = PG_HITD_CURVE_LINEAR_MOTION - PG_HITD;
16811721
}
16821722
}
16831723
else {
1684-
if (pipeline_options.usesMotionBlur && ob->get_geometry()->has_motion_blur()) {
1724+
if (pipeline_options.usesMotionBlur && hair->has_motion_blur()) {
16851725
/* Select between motion blur and non-motion blur built-in intersection module. */
16861726
instance.sbtOffset = PG_HITD_MOTION - PG_HITD;
16871727
}

intern/cycles/device/optix/device_impl.h

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct KernelParamsOptiX;
2020

2121
/* List of OptiX program groups. */
2222
enum {
23+
/* Ray generation */
2324
PG_RGEN_INTERSECT_CLOSEST,
2425
PG_RGEN_INTERSECT_SHADOW,
2526
PG_RGEN_INTERSECT_SUBSURFACE,
@@ -37,28 +38,47 @@ enum {
3738
PG_RGEN_EVAL_BACKGROUND,
3839
PG_RGEN_EVAL_CURVE_SHADOW_TRANSPARENCY,
3940
PG_RGEN_INIT_FROM_CAMERA,
41+
42+
/* Miss */
4043
PG_MISS,
44+
45+
/* Hit */
4146
PG_HITD, /* Default hit group. */
4247
PG_HITS, /* __SHADOW_RECORD_ALL__ hit group. */
4348
PG_HITL, /* __BVH_LOCAL__ hit group (only used for triangles). */
4449
PG_HITV, /* __VOLUME__ hit group. */
4550
PG_HITD_MOTION,
4651
PG_HITS_MOTION,
52+
PG_HITL_MOTION,
53+
PG_HITV_MOTION,
4754
PG_HITD_CURVE_LINEAR,
4855
PG_HITS_CURVE_LINEAR,
56+
PG_HITV_CURVE_LINEAR,
57+
PG_HITL_CURVE_LINEAR,
4958
PG_HITD_CURVE_LINEAR_MOTION,
5059
PG_HITS_CURVE_LINEAR_MOTION,
60+
PG_HITV_CURVE_LINEAR_MOTION,
61+
PG_HITL_CURVE_LINEAR_MOTION,
62+
PG_HITD_CURVE_RIBBON,
63+
PG_HITS_CURVE_RIBBON,
64+
PG_HITV_CURVE_RIBBON,
65+
PG_HITL_CURVE_RIBBON,
5166
PG_HITD_POINTCLOUD,
5267
PG_HITS_POINTCLOUD,
68+
PG_HITV_POINTCLOUD,
69+
PG_HITL_POINTCLOUD,
70+
71+
/* Callable */
5372
PG_CALL_SVM_AO,
5473
PG_CALL_SVM_BEVEL,
74+
5575
NUM_PROGRAM_GROUPS
5676
};
5777

5878
static const int MISS_PROGRAM_GROUP_OFFSET = PG_MISS;
5979
static const int NUM_MISS_PROGRAM_GROUPS = 1;
6080
static const int HIT_PROGAM_GROUP_OFFSET = PG_HITD;
61-
static const int NUM_HIT_PROGRAM_GROUPS = 8;
81+
static const int NUM_HIT_PROGRAM_GROUPS = 24;
6282
static const int CALLABLE_PROGRAM_GROUPS_BASE = PG_CALL_SVM_AO;
6383
static const int NUM_CALLABLE_PROGRAM_GROUPS = 2;
6484

intern/cycles/kernel/device/optix/bvh.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ extern "C" __global__ void __miss__kernel_optix_miss()
5050
optixSetPayload_5(PRIMITIVE_NONE);
5151
}
5252

53+
extern "C" __global__ void __anyhit__kernel_optix_ignore()
54+
{
55+
return optixIgnoreIntersection();
56+
}
57+
58+
extern "C" __global__ void __closesthit__kernel_optix_ignore() {}
59+
5360
extern "C" __global__ void __anyhit__kernel_optix_local_hit()
5461
{
5562
#if defined(__HAIR__) || defined(__POINTCLOUD__)

intern/cycles/kernel/types.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ CCL_NAMESPACE_BEGIN
8787

8888
/* BVH/sampling kernel features. */
8989
#define KERNEL_FEATURE_POINTCLOUD (1U << 12U)
90-
#define KERNEL_FEATURE_HAIR (1U << 13U)
90+
#define KERNEL_FEATURE_HAIR_RIBBON (1U << 13U)
9191
#define KERNEL_FEATURE_HAIR_THICK (1U << 14U)
92+
#define KERNEL_FEATURE_HAIR (KERNEL_FEATURE_HAIR_RIBBON | KERNEL_FEATURE_HAIR_THICK)
9293
#define KERNEL_FEATURE_OBJECT_MOTION (1U << 15U)
9394

9495
/* Denotes whether baking functionality is needed. */

intern/cycles/scene/geometry.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,7 @@ void GeometryManager::device_update_preprocess(Device *device, Scene *scene, Pro
430430
}
431431

432432
if (geom->is_hair()) {
433-
/* Set curve shape, still a global scene setting for now. */
434433
Hair *hair = static_cast<Hair *>(geom);
435-
if (hair->curve_shape != CURVE_THICK_LINEAR) {
436-
hair->curve_shape = scene->params.hair_shape;
437-
}
438434

439435
if (hair->need_update_rebuild) {
440436
device_update_flags |= DEVICE_CURVE_DATA_NEEDS_REALLOC;

0 commit comments

Comments
 (0)