Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/buffers.cpp
| Show All 36 Lines | BufferParams::BufferParams() | ||||
| width = 0; | width = 0; | ||||
| height = 0; | height = 0; | ||||
| full_x = 0; | full_x = 0; | ||||
| full_y = 0; | full_y = 0; | ||||
| full_width = 0; | full_width = 0; | ||||
| full_height = 0; | full_height = 0; | ||||
| denoising_data_pass = false; | |||||
| denoising_clean_pass = false; | |||||
| Pass::add(PASS_COMBINED, passes); | Pass::add(PASS_COMBINED, passes); | ||||
| } | } | ||||
| void BufferParams::get_offset_stride(int& offset, int& stride) | void BufferParams::get_offset_stride(int& offset, int& stride) | ||||
| { | { | ||||
| offset = -(full_x + full_y*width); | offset = -(full_x + full_y*width); | ||||
| stride = width; | stride = width; | ||||
| } | } | ||||
| Show All 10 Lines | |||||
| } | } | ||||
| int BufferParams::get_passes_size() | int BufferParams::get_passes_size() | ||||
| { | { | ||||
| int size = 0; | int size = 0; | ||||
| for(size_t i = 0; i < passes.size(); i++) | for(size_t i = 0; i < passes.size(); i++) | ||||
| size += passes[i].components; | size += passes[i].components; | ||||
| if(denoising_data_pass) { | |||||
| /* Feature passes: 11 Channels (3 Color, 3 Normal, 1 Depth, 4 Shadow) + 9 Variance | |||||
| * Color passes: 3 Noisy (RGB) + 3 Variance [+ 3 Skip (RGB)] */ | |||||
| size += 26; | |||||
| if(denoising_clean_pass) size += 3; | |||||
brecht: Would prefer to have some #defines for these things to be shared with the kernel. It's also not… | |||||
| } | |||||
| return align_up(size, 4); | return align_up(size, 4); | ||||
| } | } | ||||
| int BufferParams::get_denoising_offset() | |||||
| { | |||||
| int offset = 0; | |||||
| for(size_t i = 0; i < passes.size(); i++) | |||||
| offset += passes[i].components; | |||||
| return offset; | |||||
| } | |||||
| /* Render Buffer Task */ | /* Render Buffer Task */ | ||||
| RenderTile::RenderTile() | RenderTile::RenderTile() | ||||
| { | { | ||||
| x = 0; | x = 0; | ||||
| y = 0; | y = 0; | ||||
| w = 0; | w = 0; | ||||
| h = 0; | h = 0; | ||||
| ▲ Show 20 Lines • Show All 344 Lines • Show Last 20 Lines | |||||
Would prefer to have some #defines for these things to be shared with the kernel. It's also not entirely clear to me why these denoising passes can't be treated as regular passes here?