diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2017-08-17 02:58:48 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2017-08-17 03:00:44 +0300 |
commit | 5492d2cb673881822388c1e8ef5bda07103311e9 (patch) | |
tree | 2c636ed29867fff4e6d2f825d5bd4af802bda050 /intern/cycles | |
parent | 9b1e0f5af6f11432d7b62b5ba87a4cc0e3175bd1 (diff) |
Cycles: Calculate correct remaining time when using a larger pixel size
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/render/tile.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/intern/cycles/render/tile.cpp b/intern/cycles/render/tile.cpp index 4f3479c52ae..a9620f79fa0 100644 --- a/intern/cycles/render/tile.cpp +++ b/intern/cycles/render/tile.cpp @@ -165,15 +165,17 @@ void TileManager::set_samples(int num_samples_) uint64_t pixel_samples = 0; /* While rendering in the viewport, the initial preview resolution is increased to the native resolution * before the actual rendering begins. Therefore, additional pixel samples will be rendered. */ - int divider = get_divider(params.width, params.height, start_resolution) / 2; - while(divider > 1) { + int divider = max(get_divider(params.width, params.height, start_resolution) / 2, pixel_size); + while(divider > pixel_size) { int image_w = max(1, params.width/divider); int image_h = max(1, params.height/divider); pixel_samples += image_w * image_h; divider >>= 1; } - state.total_pixel_samples = pixel_samples + (uint64_t)get_num_effective_samples() * params.width*params.height; + int image_w = max(1, params.width/divider); + int image_h = max(1, params.height/divider); + state.total_pixel_samples = pixel_samples + (uint64_t)get_num_effective_samples() * image_w*image_h; if(schedule_denoising) { state.total_pixel_samples += params.width*params.height; } |