New ("fullframe") CPU compositor backend is being used now, and all the code
related to "tiled" CPU compositor is just never used anymore. The new backend
is faster, uses less memory, better matches GPU compositor, etc.
TL;DR: 20 thousand lines of code gone.
This commit:
- Removes various bits and pieces related to "tiled" compositor (execution
groups, one-pixel-at-a-time node processing, read/write buffer operations
related to node execution groups).
- "GPU" (OpenCL) execution device, that was only used by several nodes of
the tiled compositor.
- With that, remove CLEW external library too, since nothing within Blender
uses OpenCL directly anymore.
Pull Request: https://projects.blender.org/blender/blender/pulls/118819
71 lines
1.7 KiB
C++
71 lines
1.7 KiB
C++
/* SPDX-FileCopyrightText: 2011 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#pragma once
|
|
|
|
#include "COM_GaussianBlurBaseOperation.h"
|
|
#include "COM_MultiThreadedOperation.h"
|
|
|
|
namespace blender::compositor {
|
|
|
|
class ConvertDepthToRadiusOperation : public MultiThreadedOperation {
|
|
private:
|
|
SocketReader *depth_input_operation_;
|
|
SocketReader *image_input_operation_;
|
|
|
|
const Scene *scene_;
|
|
const NodeDefocus *data_;
|
|
|
|
float f_stop;
|
|
float max_radius;
|
|
float focal_length;
|
|
float pixels_per_meter;
|
|
float distance_to_image_of_focus;
|
|
|
|
GaussianXBlurOperation *blur_x_operation_;
|
|
GaussianYBlurOperation *blur_y_operation_;
|
|
|
|
public:
|
|
ConvertDepthToRadiusOperation();
|
|
|
|
void init_execution() override;
|
|
|
|
void set_data(const NodeDefocus *data)
|
|
{
|
|
data_ = data;
|
|
}
|
|
|
|
void set_scene(const Scene *scene)
|
|
{
|
|
scene_ = scene;
|
|
}
|
|
|
|
void set_blur_x_operation(GaussianXBlurOperation *blur_x_operation)
|
|
{
|
|
blur_x_operation_ = blur_x_operation;
|
|
}
|
|
|
|
void set_blur_y_operation(GaussianYBlurOperation *blur_y_operation)
|
|
{
|
|
blur_y_operation_ = blur_y_operation;
|
|
}
|
|
|
|
void update_memory_buffer_partial(MemoryBuffer *output,
|
|
const rcti &area,
|
|
Span<MemoryBuffer *> inputs) override;
|
|
|
|
private:
|
|
float compute_maximum_defocus_radius() const;
|
|
float compute_maximum_diameter_of_circle_of_confusion() const;
|
|
float compute_distance_to_image_of_focus() const;
|
|
float get_focal_length() const;
|
|
float compute_focus_distance() const;
|
|
float compute_pixels_per_meter() const;
|
|
float get_f_stop() const;
|
|
const Camera *get_camera() const;
|
|
const Object *get_camera_object() const;
|
|
};
|
|
|
|
} // namespace blender::compositor
|