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 <brechtvanlommel@pandora.be>2012-02-28 20:44:54 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-02-28 20:44:54 +0400
commit4a903395194aef1cfe97e4d50d73320a72280cf3 (patch)
tree056c15cc54f0d0446aef69c9b7f299023c01a69f /intern/cycles/kernel/kernel_displace.h
parent0052cbed0dadafce44f818d3d2016254c3d914d0 (diff)
Cycles: support for camera rendering an environment map with equirectangular
environment map, by enabling the Panorama option in the camera. http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Camera#Panorama The focal length or sensor settings are not used, the UI can be tweaked still to communicate this, also panorama should probably become a proper camera type like perspective or ortho.
Diffstat (limited to 'intern/cycles/kernel/kernel_displace.h')
-rw-r--r--intern/cycles/kernel/kernel_displace.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_displace.h b/intern/cycles/kernel/kernel_displace.h
index 73666892cf3..f4b33605f5b 100644
--- a/intern/cycles/kernel/kernel_displace.h
+++ b/intern/cycles/kernel/kernel_displace.h
@@ -41,9 +41,11 @@ __device void kernel_shader_evaluate(KernelGlobals *kg, uint4 *input, float4 *ou
else { // SHADER_EVAL_BACKGROUND
/* setup ray */
Ray ray;
+ float u = __int_as_float(in.x);
+ float v = __int_as_float(in.y);
ray.P = make_float3(0.0f, 0.0f, 0.0f);
- ray.D = make_float3(__int_as_float(in.x), __int_as_float(in.y), __int_as_float(in.z));
+ ray.D = equirectangular_to_direction(u, v);
ray.t = 0.0f;
#ifdef __RAY_DIFFERENTIALS__