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:
authorBrecht Van Lommel <brecht@blender.org>2022-07-25 15:50:33 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-07-25 16:19:29 +0300
commit881ef0548a32e1c71d4ede79a386cf0d5a6c1bf6 (patch)
tree33cdc06e8377b8ce675d4c6c71d037cc39784b56 /intern/cycles/kernel/integrator/subsurface_disk.h
parent484ad3165307391aa5c55656b876b3ff7d615e80 (diff)
Fix wrong Cycles SSS intersection distance after ray distance changes
No need anymore to have a difference between CPU/GPU, all distances remain in world space.
Diffstat (limited to 'intern/cycles/kernel/integrator/subsurface_disk.h')
-rw-r--r--intern/cycles/kernel/integrator/subsurface_disk.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/intern/cycles/kernel/integrator/subsurface_disk.h b/intern/cycles/kernel/integrator/subsurface_disk.h
index 2836934f6dd..60b63c075a0 100644
--- a/intern/cycles/kernel/integrator/subsurface_disk.h
+++ b/intern/cycles/kernel/integrator/subsurface_disk.h
@@ -126,17 +126,8 @@ ccl_device_inline bool subsurface_disk(KernelGlobals kg,
if (!(object_flag & SD_OBJECT_TRANSFORM_APPLIED)) {
/* Transform normal to world space. */
Transform itfm;
- Transform tfm = object_fetch_transform_motion_test(kg, object, time, &itfm);
+ object_fetch_transform_motion_test(kg, object, time, &itfm);
hit_Ng = normalize(transform_direction_transposed(&itfm, hit_Ng));
-
- /* Transform t to world space, except for OptiX and MetalRT where it already is. */
-#ifdef __KERNEL_GPU_RAYTRACING__
- (void)tfm;
-#else
- float3 D = transform_direction(&itfm, ray.D);
- D = normalize(D) * ss_isect.hits[hit].t;
- ss_isect.hits[hit].t = len(transform_direction(&tfm, D));
-#endif
}
/* Quickly retrieve P and Ng without setting up ShaderData. */