Fix Cycles world volume scattering missing light in some cases
With very large distances there were precision / overflow errors, normalize the average albedo to avoid that. This was causing test failures on macOS Arm, but also other architectures had slightly wrong results. Ref T78710
This commit is contained in:
@@ -840,7 +840,7 @@ ccl_device void kernel_volume_decoupled_record(KernelGlobals *kg,
|
||||
|
||||
/* compute average albedo for channel sampling */
|
||||
if (closure_flag & SD_SCATTER) {
|
||||
accum_albedo += dt * safe_divide_color(coeff.sigma_s, sigma_t);
|
||||
accum_albedo += (dt / ray->t) * safe_divide_color(coeff.sigma_s, sigma_t);
|
||||
}
|
||||
|
||||
/* compute accumulated transmittance */
|
||||
|
||||
Reference in New Issue
Block a user