Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Maury <omaury>2022-05-17 21:16:52 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-05-17 22:07:49 +0300
commitb48adbc9d79c55b8dac368865098b34c7536d74f (patch)
tree867b84ad0f63bc985dc1dbcf38e0fd3d53c8d958 /intern/cycles/kernel/integrator/shade_surface.h
parent83349294b12f904bc1295c53e0242ea92c593c93 (diff)
Fix T97921: Cycles MNEE issue with light path nodes
Ensure the correct total/diffuse/transmission depth is set when evaluating shaders for MNEE, consistent with regular light shader evaluation. Differential Revision: https://developer.blender.org/D14902
Diffstat (limited to 'intern/cycles/kernel/integrator/shade_surface.h')
-rw-r--r--intern/cycles/kernel/integrator/shade_surface.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/integrator/shade_surface.h b/intern/cycles/kernel/integrator/shade_surface.h
index 859c314b088..896e81b80ff 100644
--- a/intern/cycles/kernel/integrator/shade_surface.h
+++ b/intern/cycles/kernel/integrator/shade_surface.h
@@ -253,13 +253,13 @@ ccl_device_forceinline void integrate_surface_direct_light(KernelGlobals kg,
# ifdef __MNEE__
if (mnee_vertex_count > 0) {
INTEGRATOR_STATE_WRITE(shadow_state, shadow_path, transmission_bounce) =
- INTEGRATOR_STATE(state, path, transmission_bounce) + mnee_vertex_count;
+ INTEGRATOR_STATE(state, path, transmission_bounce) + mnee_vertex_count - 1;
INTEGRATOR_STATE_WRITE(shadow_state,
shadow_path,
diffuse_bounce) = INTEGRATOR_STATE(state, path, diffuse_bounce) + 1;
INTEGRATOR_STATE_WRITE(shadow_state,
shadow_path,
- bounce) = INTEGRATOR_STATE(state, path, bounce) + 1 + mnee_vertex_count;
+ bounce) = INTEGRATOR_STATE(state, path, bounce) + mnee_vertex_count;
}
else
# endif