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
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-21 17:22:24 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-21 17:22:24 +0400
commita9c601ceff2e45166307a739ebcab5ddf9dcd4cc (patch)
treeae8a837e0b7b759f7e9e7b9d3b4f858ba2a085be /intern
parent7011d3cfe2af73c390448557a87d3781413afbfe (diff)
Fix #33257: cycles camera clipping did not work through transparent objects.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_path.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index 70a9b372ebc..195291898c6 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -424,7 +424,12 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample,
/* setup ray */
ray.P = ray_offset(sd.P, (label & LABEL_TRANSMIT)? -sd.Ng: sd.Ng);
ray.D = bsdf_omega_in;
- ray.t = FLT_MAX;
+
+ if(state.bounce == 0)
+ ray.t -= sd.ray_length; /* clipping works through transparent */
+ else
+ ray.t = FLT_MAX;
+
#ifdef __RAY_DIFFERENTIALS__
ray.dP = sd.dP;
ray.dD = bsdf_domega_in;
@@ -887,6 +892,7 @@ __device float4 kernel_path_non_progressive(KernelGlobals *kg, RNG *rng, int sam
path_state_next(kg, &state, LABEL_TRANSPARENT);
ray.P = ray_offset(sd.P, -sd.Ng);
+ ray.t -= sd.ray_length; /* clipping works through transparent */
}
float3 L_sum = path_radiance_sum(kg, &L);