Fix T65771 Eevee: Volume Emission not working if density is zero
This commit is contained in:
parent
dcf520cdad
commit
c2a762c8e6
Notes:
blender-bot
2023-02-14 10:37:50 +01:00
Referenced by issue #65771, Volumetric emission no longer works if density of reflective volume is set to zero
|
@ -48,6 +48,10 @@ void main()
|
|||
float cell_depth = volume_z_to_view_z((float(i) + 1.0) / tex_size.z);
|
||||
float ray_len = orig_ray_len * cell_depth;
|
||||
|
||||
/* Emission does not work of there is no extinction because
|
||||
* Tr evaluates to 1.0 leading to Lscat = 0.0. (See T65771) */
|
||||
s_extinction = max(vec3(1e-7) * step(1e-5, Lscat), s_extinction);
|
||||
|
||||
/* Evaluate Scattering */
|
||||
float s_len = abs(ray_len - prev_ray_len);
|
||||
prev_ray_len = ray_len;
|
||||
|
|
Loading…
Reference in New Issue