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-03-20 23:32:12 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-03-20 23:32:12 +0400
commitb26d3f371a0de486f7147e580695c60b03c37825 (patch)
tree762a8e59e3e83fd020de40384206b6530758f7f6 /intern
parent9687c1fd2e23df2e0a66bdb0657a64608cd8d158 (diff)
Fix #30603: cycles incorrect ray differentials when rendering with panorama
camera, causing bump map issues.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_camera.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/kernel_camera.h b/intern/cycles/kernel/kernel_camera.h
index 251b2c280da..0460765fe86 100644
--- a/intern/cycles/kernel/kernel_camera.h
+++ b/intern/cycles/kernel/kernel_camera.h
@@ -146,10 +146,10 @@ __device void camera_sample_environment(KernelGlobals *kg, float raster_x, float
ray->dP.dy = make_float3(0.0f, 0.0f, 0.0f);
Pcamera = transform(&rastertocamera, make_float3(raster_x + 1.0f, raster_y, 0.0f));
- ray->dD.dx = equirectangular_to_direction(Pcamera.x, Pcamera.y) - ray->D;
+ ray->dD.dx = normalize(transform_direction(&cameratoworld, equirectangular_to_direction(Pcamera.x, Pcamera.y))) - ray->D;
Pcamera = transform(&rastertocamera, make_float3(raster_x, raster_y + 1.0f, 0.0f));
- ray->dD.dy = equirectangular_to_direction(Pcamera.x, Pcamera.y) - ray->D;
+ ray->dD.dy = normalize(transform_direction(&cameratoworld, equirectangular_to_direction(Pcamera.x, Pcamera.y))) - ray->D;
#endif
#ifdef __CAMERA_CLIPPING__