Cycles: Revert previous fixes to intersect_all functions
While they prevent legit write past the array boundary error those fixes introduced regression in behavior when having exact max_hits transparent intersections and nothing else. Previous code would have considered such case a totally opaque, but it's not correct. Fixes T48941: Some materials don't get transparent shadows anymore
This commit is contained in:
@@ -75,12 +75,7 @@ ccl_device_inline bool shadow_blocked(KernelGlobals *kg, ShaderData *shadow_sd,
|
||||
}
|
||||
|
||||
uint num_hits;
|
||||
if(max_hits == 0) {
|
||||
blocked = true;
|
||||
num_hits = 0;
|
||||
} else {
|
||||
blocked = scene_intersect_shadow_all(kg, ray, hits, max_hits, &num_hits);
|
||||
}
|
||||
blocked = scene_intersect_shadow_all(kg, ray, hits, max_hits, &num_hits);
|
||||
|
||||
/* if no opaque surface found but we did find transparent hits, shade them */
|
||||
if(!blocked && num_hits > 0) {
|
||||
|
Reference in New Issue
Block a user