Fix floating-point precision issue in accumulation_buffer
Fixed an issue that prevented the image from converging. (Technically, the convergence was happening and the issue was the final calculation of the displayed colours, but the visual effect was the same as failure to converge.)
This commit is contained in:
parent
07651817dc
commit
406f347971
|
|
@ -56,7 +56,7 @@ impl AccumulationBuffer {
|
|||
let colour_sum_t = buffer_colour_sum.values + colour_sum_y;
|
||||
buffer_colour_bias.values = (colour_sum_t - buffer_colour_sum.values) - colour_sum_y;
|
||||
buffer_colour_sum.values = colour_sum_t;
|
||||
buffer_colour.values = buffer_colour_sum.values * (1.0 / *buffer_weight);
|
||||
buffer_colour.values = buffer_colour_sum.values / *buffer_weight;
|
||||
}
|
||||
|
||||
pub fn merge_tile(&mut self, tile: &Tile, src: &AccumulationBuffer) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue