Cycles: Make camera-in-volume an official feature
This means it's no longer needed to enable experimental feature set in order to have proper camera in volume support. And this also means if there's something wrong going on, or if there's speed regression for cases when camera is obviously not in the volume -- this issues are to be reported and handled in the regular matter. Happy blending!
This commit is contained in:
@@ -390,7 +390,6 @@ void BlenderSync::sync_camera(BL::RenderSettings b_render, BL::Object b_override
|
||||
/* sync */
|
||||
Camera *cam = scene->camera;
|
||||
blender_camera_sync(cam, &bcam, width, height);
|
||||
scene->camera->use_camera_in_volume = experimental;
|
||||
}
|
||||
|
||||
void BlenderSync::sync_camera_motion(BL::Object b_ob, float motion_time)
|
||||
@@ -555,7 +554,6 @@ void BlenderSync::sync_view(BL::SpaceView3D b_v3d, BL::RegionView3D b_rv3d, int
|
||||
blender_camera_border(&bcam, b_scene.render(), b_scene, b_v3d, b_rv3d, width, height);
|
||||
|
||||
blender_camera_sync(scene->camera, &bcam, width, height);
|
||||
scene->camera->use_camera_in_volume = experimental;
|
||||
}
|
||||
|
||||
BufferParams BlenderSync::get_buffer_params(BL::RenderSettings b_render, BL::Scene b_scene, BL::SpaceView3D b_v3d, BL::RegionView3D b_rv3d, Camera *cam, int width, int height)
|
||||
|
@@ -276,17 +276,15 @@ void Camera::device_update(Device *device, DeviceScene *dscene, Scene *scene)
|
||||
|
||||
/* Camera in volume. */
|
||||
kcam->is_inside_volume = 0;
|
||||
if(use_camera_in_volume) {
|
||||
BoundBox viewplane_boundbox = viewplane_bounds_get();
|
||||
for(size_t i = 0; i < scene->objects.size(); ++i) {
|
||||
Object *object = scene->objects[i];
|
||||
if(object->mesh->has_volume &&
|
||||
viewplane_boundbox.intersects(object->bounds))
|
||||
{
|
||||
/* TODO(sergey): Consider adding more grained check. */
|
||||
kcam->is_inside_volume = 1;
|
||||
break;
|
||||
}
|
||||
BoundBox viewplane_boundbox = viewplane_bounds_get();
|
||||
for(size_t i = 0; i < scene->objects.size(); ++i) {
|
||||
Object *object = scene->objects[i];
|
||||
if(object->mesh->has_volume &&
|
||||
viewplane_boundbox.intersects(object->bounds))
|
||||
{
|
||||
/* TODO(sergey): Consider adding more grained check. */
|
||||
kcam->is_inside_volume = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -102,13 +102,6 @@ public:
|
||||
bool need_device_update;
|
||||
int previous_need_motion;
|
||||
|
||||
/* Camera in volume. */
|
||||
/* TODO(sergey): Get rid of this argument once
|
||||
* cameras in volume considered fast enough for
|
||||
* the regular kernel.
|
||||
*/
|
||||
bool use_camera_in_volume;
|
||||
|
||||
/* functions */
|
||||
Camera();
|
||||
~Camera();
|
||||
|
Reference in New Issue
Block a user