23 int index =
static_cast<int>(pass_type) * 2;
64 :
Node(get_node_type()),
65 type(scene_pass->get_type()),
66 mode(scene_pass->get_mode()),
67 name(scene_pass->get_name()),
68 include_albedo(scene_pass->get_include_albedo()),
69 lightgroup(scene_pass->get_lightgroup())
103 SOCKET_BOOLEAN(use_approximate_shadow_catcher,
"Use Approximate Shadow Catcher",
false);
104 SOCKET_BOOLEAN(use_transparent_background,
"Transparent Background",
false);
144 for (
const Pass *scene_pass : scene_passes) {
147 if (scene_pass->is_written()) {
149 pass_stride += scene_pass->get_info().num_components;
155 passes.emplace_back(std::move(buffer_pass));
181 if (pass.name ==
name) {
192 if (pass.type ==
type && pass.mode == mode) {
214 if (shadow_catcher_matte_pass) {
215 pass = shadow_catcher_matte_pass;
310 const size_t src_offset)
326 for (
int i = 0; i <
PASS_NUM; ++i) {
339 pass_offsets[num_passes].dst_offset = dst_pass_offset;
340 pass_offsets[num_passes].src_offset = src_pass_offset;
350 const int64_t dst_num_pixels = dst_width * dst_height;
353 const int64_t src_offset_in_floats = src_offset * src_pass_stride;
355 const float *src_pixel =
src->buffer.data() + src_offset_in_floats;
358 for (
int i = 0; i < dst_num_pixels;
359 ++i, src_pixel += src_pass_stride, dst_pixel += dst_pass_stride) {
360 for (
int pass_offset_idx = 0; pass_offset_idx < num_passes; ++pass_offset_idx) {
361 const int dst_pass_offset = pass_offsets[pass_offset_idx].dst_offset;
362 const int src_pass_offset = pass_offsets[pass_offset_idx].src_offset;
365 dst_pixel[dst_pass_offset + 0] = src_pixel[src_pass_offset + 0];
366 dst_pixel[dst_pass_offset + 1] = src_pixel[src_pass_offset + 1];
367 dst_pixel[dst_pass_offset + 2] = src_pixel[src_pass_offset + 2];
368 dst_pixel[dst_pass_offset + 3] = src_pixel[src_pass_offset + 3];
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
static CCL_NAMESPACE_BEGIN int pass_type_mode_to_index(PassType pass_type, PassMode mode)
void render_buffers_host_copy_denoised(RenderBuffers *dst, const BufferParams &dst_params, const RenderBuffers *src, const BufferParams &src_params, const size_t src_offset)
static int pass_to_index(const BufferPass &pass)
int pass_offset_[kNumPassOffsets]
bool use_approximate_shadow_catcher
vector< BufferPass > passes
static constexpr int kNumPassOffsets
int get_pass_offset(PassType type, PassMode mode=PassMode::NOISY) const
void update_offset_stride()
bool modified(const BufferParams &other) const
const BufferPass * find_pass(string_view name) const
const BufferPass * get_actual_display_pass(PassType type, PassMode mode=PassMode::NOISY) const
bool use_transparent_background
PassInfo get_info() const
NODE_DECLARE PassType type
PassInfo get_info() const
static const NodeEnum * get_type_enum()
static const NodeEnum * get_mode_enum()
device_vector< float > buffer
void reset(const BufferParams ¶ms)
RenderBuffers(Device *device)
device_ptr device_pointer
T * alloc(size_t width, size_t height=0, size_t depth=0)
#define CCL_NAMESPACE_END
SyclQueue void void * src
ccl_gpu_kernel_postfix ccl_global float int full_x
ccl_global float * buffer
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
ccl_gpu_kernel_postfix ccl_global float int int full_y
@ PASS_SHADOW_CATCHER_MATTE
#define DCHECK(expression)
std::unique_ptr< IDProperty, IDPropertyDeleter > create(StringRefNull prop_name, int32_t value)
Allocate a new IDProperty of type IDP_INT, set its name and value.
#define SOCKET_FLOAT(name, ui_name, default_value,...)
#define SOCKET_INT(name, ui_name, default_value,...)
#define SOCKET_BOOLEAN(name, ui_name, default_value,...)
#define SOCKET_STRING(name, ui_name, default_value,...)
#define SOCKET_ENUM(name, ui_name, values, default_value,...)
static NodeType * add(const char *name, CreateFunc create, Type type=NONE, const NodeType *base=NULL)