Workbench Next Volumes #105501

Merged
Miguel Pozo merged 10 commits from pragma37/blender:pull-workbench-next-volumes into main 2023-05-16 16:56:27 +02:00
1 changed files with 6 additions and 0 deletions
Showing only changes of commit e7cadb3045 - Show all commits

View File

@ -209,6 +209,12 @@ vec4 volume_integration(vec3 ray_ori, vec3 ray_dir, float ray_inc, float ray_max
/* accumulate and also take into account the transmittance from previous steps */
final_scattering += final_transmittance * Lscat;
final_transmittance *= Tr;
if (final_transmittance <= 0.01) {
/* Early out */
final_transmittance = 0;
pragma37 marked this conversation as resolved Outdated

Do not use implicit cast assignment. This is not supported by all drivers.

Do not use implicit cast assignment. This is not supported by all drivers.
break;
}
}
return vec4(final_scattering, final_transmittance);