Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/buffers.cpp
| Show First 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | for (int pass_offset_idx = 0; pass_offset_idx < num_passes; ++pass_offset_idx) { | ||||
| dst_pixel[dst_pass_offset + 0] = src_pixel[src_pass_offset + 0]; | dst_pixel[dst_pass_offset + 0] = src_pixel[src_pass_offset + 0]; | ||||
| dst_pixel[dst_pass_offset + 1] = src_pixel[src_pass_offset + 1]; | dst_pixel[dst_pass_offset + 1] = src_pixel[src_pass_offset + 1]; | ||||
| dst_pixel[dst_pass_offset + 2] = src_pixel[src_pass_offset + 2]; | dst_pixel[dst_pass_offset + 2] = src_pixel[src_pass_offset + 2]; | ||||
| dst_pixel[dst_pass_offset + 3] = src_pixel[src_pass_offset + 3]; | dst_pixel[dst_pass_offset + 3] = src_pixel[src_pass_offset + 3]; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void render_buffers_scale_uniform(RenderBuffers *buffers, const float scale) | |||||
| { | |||||
| DCHECK_EQ(buffers->params.get_pass_offset(PASS_SAMPLE_COUNT), PASS_UNUSED); | |||||
| if (scale == 1.0f) { | |||||
| return; | |||||
| } | |||||
| const BufferParams ¶ms = buffers->params; | |||||
| const int64_t width = params.width; | |||||
| const int64_t height = params.height; | |||||
| const int64_t num_pixels = width * height; | |||||
| const int64_t num_component_pixels = num_pixels * params.pass_stride; | |||||
| float *pixels = buffers->buffer.data(); | |||||
| for (int64_t i = 0; i < num_component_pixels; ++i) { | |||||
| pixels[i] *= scale; | |||||
brecht: There are render passes which are written exactly once, like the depth pass. So for that… | |||||
Done Inline ActionsUgh, I forgot about those. Think we should work on a solution which allows to properly resume rendering after cancel. Is "just" we need to store per-tile number of samples in the metadata. I am currently looking into how to implement this in practice. sergey: Ugh, I forgot about those.
Think we should work on a solution which allows to properly resume… | |||||
| } | |||||
| } | |||||
| CCL_NAMESPACE_END | CCL_NAMESPACE_END | ||||
There are render passes which are written exactly once, like the depth pass. So for that pass_info.use_filter needs to be taken into account. Also not sure how this works with things like cryptomatte.