Fix bug that shifted view one tile to the right

This commit is contained in:
Matthew Gordon 2020-08-18 22:05:14 -04:00
parent 5c2fbf995a
commit a98c0c4bca
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ pub fn partial_render_scene<T: Real>(
let sampler = Sampler { scene: &scene }; let sampler = Sampler { scene: &scene };
for column in 0..tile.width() { for column in 0..tile.width() {
for row in 0..tile.height() { for row in 0..tile.height() {
let ray = image_sampler.ray_for_pixel(tile.start_row + row, tile.end_column + column); let ray = image_sampler.ray_for_pixel(tile.start_row + row, tile.start_column + column);
let hit = sampler.sample(&ray); let hit = sampler.sample(&ray);
let colour = match hit { let colour = match hit {
None => ColourRgbF::from_named(NamedColour::Black), None => ColourRgbF::from_named(NamedColour::Black),