diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-09-16 20:39:03 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-09-16 20:39:03 +0300 |
commit | 5e8b09259bf20f6b1a35422580adccc99c803a3e (patch) | |
tree | c4f0ab262a6df25e6a9d81fa2912609da4a511aa | |
parent | 22717ed35171a1b5f49c5fa59747edb9e345a851 (diff) |
Fix T91441: bump node not working for shadow rays
-rw-r--r-- | intern/cycles/kernel/integrator/integrator_state_template.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/integrator/integrator_state_util.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/kernel/integrator/integrator_state_template.h b/intern/cycles/kernel/integrator/integrator_state_template.h index be5bb97754a..41dd1bfcdbf 100644 --- a/intern/cycles/kernel/integrator/integrator_state_template.h +++ b/intern/cycles/kernel/integrator/integrator_state_template.h @@ -138,7 +138,7 @@ KERNEL_STRUCT_MEMBER(shadow_ray, float3, P, KERNEL_FEATURE_PATH_TRACING) KERNEL_STRUCT_MEMBER(shadow_ray, float3, D, KERNEL_FEATURE_PATH_TRACING) KERNEL_STRUCT_MEMBER(shadow_ray, float, t, KERNEL_FEATURE_PATH_TRACING) KERNEL_STRUCT_MEMBER(shadow_ray, float, time, KERNEL_FEATURE_PATH_TRACING) -/* TODO: compact differentials. */ +KERNEL_STRUCT_MEMBER(shadow_ray, float, dP, KERNEL_FEATURE_PATH_TRACING) KERNEL_STRUCT_END(shadow_ray) /*********************** Shadow Intersection result **************************/ diff --git a/intern/cycles/kernel/integrator/integrator_state_util.h b/intern/cycles/kernel/integrator/integrator_state_util.h index bcbc6d422ad..cdf412fe22f 100644 --- a/intern/cycles/kernel/integrator/integrator_state_util.h +++ b/intern/cycles/kernel/integrator/integrator_state_util.h @@ -54,6 +54,7 @@ ccl_device_forceinline void integrator_state_write_shadow_ray(INTEGRATOR_STATE_A INTEGRATOR_STATE_WRITE(shadow_ray, D) = ray->D; INTEGRATOR_STATE_WRITE(shadow_ray, t) = ray->t; INTEGRATOR_STATE_WRITE(shadow_ray, time) = ray->time; + INTEGRATOR_STATE_WRITE(shadow_ray, dP) = ray->dP; } ccl_device_forceinline void integrator_state_read_shadow_ray(INTEGRATOR_STATE_CONST_ARGS, @@ -63,7 +64,7 @@ ccl_device_forceinline void integrator_state_read_shadow_ray(INTEGRATOR_STATE_CO ray->D = INTEGRATOR_STATE(shadow_ray, D); ray->t = INTEGRATOR_STATE(shadow_ray, t); ray->time = INTEGRATOR_STATE(shadow_ray, time); - ray->dP = differential_zero_compact(); + ray->dP = INTEGRATOR_STATE(shadow_ray, dP); ray->dD = differential_zero_compact(); } |