forked from bartvdbraak/blender
Cycles: Fix MetalRT shadow all hit bug
This patch fixes a MetalRT issue where viable shadow hits are discounted based on the false assumption that hits are ordered by distance. With this patch, the following unit tests now pass: - openvdb smoke - shadow catcher pt transparent lamp only 0.8 - shadow catcher pt transparent lamp only 1.0 Pull Request: https://projects.blender.org/blender/blender/pulls/106276
This commit is contained in:
parent
8ce3bb6e05
commit
944a5854c6
@ -289,9 +289,8 @@ bool metalrt_shadow_all_hit(constant KernelParamsMetal &launch_params_metal,
|
||||
}
|
||||
|
||||
if (ray_tmax >= max_recorded_t) {
|
||||
/* Accept hit, so that we don't consider any more hits beyond the distance of the
|
||||
* current hit anymore. */
|
||||
payload.result = true;
|
||||
/* Ray hits are not guaranteed to be ordered by distance so don't exit early here.
|
||||
* Continue search. */
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user