Fix T39823: SSS scatter doesn't update volume stack, causing shading artifacts
Basically the title says it all, we need to update volume stack when doing ray scatter for SSS. This leads to speed regressions in cases scene does have both volume and SSS (performance in case there's no SSS or no volume should be the same). We might try optimizing kernel_path_subsurface_update_volume_stack() a bit by either recording all intersections or using some more appropriate visibility flags. Reviewers: brecht, juicyfruit, dingto Differential Revision: https://developer.blender.org/D795
This commit is contained in:
@@ -96,7 +96,7 @@ ccl_device void compute_light_pass(KernelGlobals *kg, ShaderData *sd, PathRadian
|
||||
/* sample subsurface scattering */
|
||||
if((is_combined || is_sss_sample) && (sd->flag & SD_BSSRDF)) {
|
||||
/* when mixing BSSRDF and BSDF closures we should skip BSDF lighting if scattering was successful */
|
||||
kernel_branched_path_subsurface_scatter(kg, sd, &L_sample, &state, &rng, throughput);
|
||||
kernel_branched_path_subsurface_scatter(kg, sd, &L_sample, &state, &rng, &ray, throughput);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user