Skip to content

Commit

Permalink
Take resolution division into account.
Browse files Browse the repository at this point in the history
  • Loading branch information
jesterKing committed Sep 28, 2024
1 parent dc631c3 commit c14a7ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ccycles/ccsession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,9 @@ bool CCyclesOutputDriver::write_or_update_render_tile(const Tile &tile)
}
else {
for (auto &pass : *full_passes) {
if(pass->get_pass_type() == PASS_DEPTH && tile.get_sample() > 1)
{
bool upscale = tile.resolution_divider > ccsession_->params.pixel_size ||
ccsession_->params.pixel_size > 1;
if (!upscale && pass->get_pass_type() == PASS_DEPTH && tile.get_sample() > 1) {
continue;
}

Expand All @@ -306,8 +307,7 @@ bool CCyclesOutputDriver::write_or_update_render_tile(const Tile &tile)
/* In case we have pixel_size > 1 we need to move data so that we get
* pixels in top-left quadrant.
*/
if(tile.resolution_divider > ccsession_->params.pixel_size
|| ccsession_->params.pixel_size > 1) {
if(upscale) {
const int ps =
tile.resolution_divider > ccsession_->params.pixel_size
? tile.resolution_divider
Expand Down

0 comments on commit c14a7ba

Please sign in to comment.