mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
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:
parent
a3f091d7ce
commit
af940c68cb
1 changed files with 1 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue