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:
authorDalai Felinto <dfelinto@gmail.com>2014-05-27 17:56:59 +0400
committerDalai Felinto <dfelinto@gmail.com>2014-05-27 18:09:36 +0400
commit517094a6977abd2ca3f50f15780fc15fdb125b99 (patch)
treefbe26e865d1c45ea1974c392089b3f65dd2d067a /intern/cycles/kernel/kernel_bake.h
parent12abe94de827d9ae9c0dd6cc49bc6c3e377842ad (diff)
Cycles: new camera_direction_from_point
Reviewers: brecht Differential Revision: https://developer.blender.org/D556
Diffstat (limited to 'intern/cycles/kernel/kernel_bake.h')
-rw-r--r--intern/cycles/kernel/kernel_bake.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/intern/cycles/kernel/kernel_bake.h b/intern/cycles/kernel/kernel_bake.h
index 4aae0aada0c..c84398685c1 100644
--- a/intern/cycles/kernel/kernel_bake.h
+++ b/intern/cycles/kernel/kernel_bake.h
@@ -175,21 +175,13 @@ ccl_device void kernel_bake_evaluate(KernelGlobals *kg, ccl_global uint4 *input,
float time = TIME_INVALID;
int bounce = 0;
int transparent_bounce = 0;
- Transform cameratoworld = kernel_data.cam.cameratoworld;
/* light passes */
PathRadiance L;
shader_setup_from_sample(kg, &sd, P, Ng, I, shader, object, prim, u, v, t, time, bounce, transparent_bounce);
- if(kernel_data.cam.type == CAMERA_ORTHOGRAPHIC) {
- float3 camD = make_float3(cameratoworld.x.z, cameratoworld.y.z, cameratoworld.z.z);
- sd.I = -camD;
- }
- else {
- float3 camP = make_float3(cameratoworld.x.w, cameratoworld.y.w, cameratoworld.z.w);
- sd.I = normalize(camP - sd.P);
- }
+ sd.I = camera_direction_from_point(kg, sd.P);
/* update differentials */
sd.dP.dx = sd.dPdu * dudx + sd.dPdv * dvdx;