Skip to content

Commit

Permalink
Fix incorrect tile dimensions.
Browse files Browse the repository at this point in the history
This resolves the issue where tile progress bars were sometimes inaccurate.
  • Loading branch information
vkoskiv committed Feb 3, 2020
1 parent 83305dc commit 4a22ff0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/datatypes/tile.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ int quantizeImage(struct renderTile **renderTiles, unsigned width, unsigned heig
tile->end.x = min((x + 1) * tileWidth, width);
tile->end.y = min((y + 1) * tileHeight, height);

tile->width = tile->end.x - tile->begin.x;
tile->height = tile->end.y - tile->begin.y;

//Samples have to start at 1, so the running average works
tile->completedSamples = 1;
tile->isRendering = false;
Expand Down

0 comments on commit 4a22ff0

Please sign in to comment.