Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/scene/object.cpp
| Show First 20 Lines • Show All 552 Lines • ▼ Show 20 Lines | void ObjectManager::device_update_object_transform(UpdateObjectTransformState *state, | ||||
| } | } | ||||
| else { | else { | ||||
| kobject.lightgroup = LIGHTGROUP_NONE; | kobject.lightgroup = LIGHTGROUP_NONE; | ||||
| } | } | ||||
| } | } | ||||
| void ObjectManager::device_update_prim_offsets(Device *device, DeviceScene *dscene, Scene *scene) | void ObjectManager::device_update_prim_offsets(Device *device, DeviceScene *dscene, Scene *scene) | ||||
| { | { | ||||
| if (!scene->integrator->get_use_light_tree()) { | |||||
| BVHLayoutMask layout_mask = device->get_bvh_layout_mask(); | BVHLayoutMask layout_mask = device->get_bvh_layout_mask(); | ||||
| if (layout_mask != BVH_LAYOUT_METAL && layout_mask != BVH_LAYOUT_MULTI_METAL && | if (layout_mask != BVH_LAYOUT_METAL && layout_mask != BVH_LAYOUT_MULTI_METAL && | ||||
| layout_mask != BVH_LAYOUT_MULTI_METAL_EMBREE) { | layout_mask != BVH_LAYOUT_MULTI_METAL_EMBREE) { | ||||
| return; | return; | ||||
| } | } | ||||
| } | |||||
| /* On MetalRT, primitive / curve segment offsets can't be baked at BVH build time. Intersection | /* On MetalRT, primitive / curve segment offsets can't be baked at BVH build time. Intersection | ||||
| * handlers need to apply the offset manually. */ | * handlers need to apply the offset manually. */ | ||||
| uint *object_prim_offset = dscene->object_prim_offset.alloc(scene->objects.size()); | uint *object_prim_offset = dscene->object_prim_offset.alloc(scene->objects.size()); | ||||
| foreach (Object *ob, scene->objects) { | foreach (Object *ob, scene->objects) { | ||||
| uint32_t prim_offset = 0; | uint32_t prim_offset = 0; | ||||
| if (Geometry *const geom = ob->geometry) { | if (Geometry *const geom = ob->geometry) { | ||||
| if (geom->geometry_type == Geometry::HAIR) { | if (geom->geometry_type == Geometry::HAIR) { | ||||
| ▲ Show 20 Lines • Show All 467 Lines • Show Last 20 Lines | |||||