Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/buffers.cpp
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| NODE_DEFINE(BufferParams) | NODE_DEFINE(BufferParams) | ||||
| { | { | ||||
| NodeType *type = NodeType::add("buffer_params", create); | NodeType *type = NodeType::add("buffer_params", create); | ||||
| SOCKET_INT(width, "Width", 0); | SOCKET_INT(width, "Width", 0); | ||||
| SOCKET_INT(height, "Height", 0); | SOCKET_INT(height, "Height", 0); | ||||
| SOCKET_INT(window_x, "Window X", 0); | |||||
| SOCKET_INT(window_y, "Window Y", 0); | |||||
| SOCKET_INT(window_width, "Window Width", 0); | |||||
| SOCKET_INT(window_height, "Window Height", 0); | |||||
| SOCKET_INT(full_x, "Full X", 0); | SOCKET_INT(full_x, "Full X", 0); | ||||
| SOCKET_INT(full_y, "Full Y", 0); | SOCKET_INT(full_y, "Full Y", 0); | ||||
| SOCKET_INT(full_width, "Full Width", 0); | SOCKET_INT(full_width, "Full Width", 0); | ||||
| SOCKET_INT(full_height, "Full Height", 0); | SOCKET_INT(full_height, "Full Height", 0); | ||||
| SOCKET_STRING(layer, "Layer", ustring()); | SOCKET_STRING(layer, "Layer", ustring()); | ||||
| SOCKET_STRING(view, "View", ustring()); | SOCKET_STRING(view, "View", ustring()); | ||||
| SOCKET_FLOAT(exposure, "Exposure", 1.0f); | SOCKET_FLOAT(exposure, "Exposure", 1.0f); | ||||
| ▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | |||||
| void BufferParams::update_offset_stride() | void BufferParams::update_offset_stride() | ||||
| { | { | ||||
| offset = -(full_x + full_y * width); | offset = -(full_x + full_y * width); | ||||
| stride = width; | stride = width; | ||||
| } | } | ||||
| bool BufferParams::modified(const BufferParams &other) const | bool BufferParams::modified(const BufferParams &other) const | ||||
| { | { | ||||
| if (!(width == other.width && height == other.height && full_x == other.full_x && | if (width != other.width || height != other.height) { | ||||
| full_y == other.full_y && full_width == other.full_width && | return true; | ||||
| full_height == other.full_height && offset == other.offset && stride == other.stride && | } | ||||
| pass_stride == other.pass_stride && layer == other.layer && view == other.view && | |||||
| exposure == other.exposure && | if (full_x != other.full_x || full_y != other.full_y || full_width != other.full_width || | ||||
| use_approximate_shadow_catcher == other.use_approximate_shadow_catcher && | full_height != other.full_height) { | ||||
| use_transparent_background == other.use_transparent_background)) { | return true; | ||||
| } | |||||
| if (window_x != other.window_x || window_y != other.window_y || | |||||
| window_width != other.window_width || window_height != other.window_height) { | |||||
| return true; | |||||
| } | |||||
| if (offset != other.offset || stride != other.stride || pass_stride != other.pass_stride) { | |||||
| return true; | |||||
| } | |||||
| if (layer != other.layer || view != other.view) { | |||||
| return false; | |||||
| } | |||||
| if (exposure != other.exposure || | |||||
| use_approximate_shadow_catcher != other.use_approximate_shadow_catcher || | |||||
| use_transparent_background != other.use_transparent_background) { | |||||
| return true; | return true; | ||||
| } | } | ||||
| return !(passes == other.passes); | return !(passes == other.passes); | ||||
| } | } | ||||
| /* -------------------------------------------------------------------- | /* -------------------------------------------------------------------- | ||||
| * Render Buffers. | * Render Buffers. | ||||
| ▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines | |||||