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:
authorThomas Dinges <blender@dingto.org>2014-06-13 23:27:21 +0400
committerThomas Dinges <blender@dingto.org>2014-06-13 23:59:13 +0400
commit49df707496e505c8a8b21c1ea36b479e950cc66c (patch)
tree29ad1b81a9cc9cbb020d114772319171500fab61 /intern/cycles/kernel/geom/geom_motion_triangle.h
parentcd5e1ff74e4f6443f3e4b836dd23fe46b56cb7ed (diff)
Cycles: Calculate face normal on the fly.
Instead of pre-calculation and storage, we now calculate the face normal during render. This gives a small slowdown (~1%) but decreases memory usage, which is especially important for GPUs, where you have limited VRAM. Part of my GSoC 2014.
Diffstat (limited to 'intern/cycles/kernel/geom/geom_motion_triangle.h')
-rw-r--r--intern/cycles/kernel/geom/geom_motion_triangle.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/intern/cycles/kernel/geom/geom_motion_triangle.h b/intern/cycles/kernel/geom/geom_motion_triangle.h
index 73fcf1adda6..5ab0b731bdd 100644
--- a/intern/cycles/kernel/geom/geom_motion_triangle.h
+++ b/intern/cycles/kernel/geom/geom_motion_triangle.h
@@ -233,8 +233,7 @@ ccl_device_inline float3 motion_triangle_refine_subsurface(KernelGlobals *kg, Sh
ccl_device_noinline void motion_triangle_shader_setup(KernelGlobals *kg, ShaderData *sd, const Intersection *isect, const Ray *ray, bool subsurface)
{
/* get shader */
- float4 Ns = kernel_tex_fetch(__tri_normal, sd->prim);
- sd->shader = __float_as_int(Ns.w);
+ sd->shader = __float_as_int(kernel_tex_fetch(__tri_shader, sd->prim));
/* get motion info */
int numsteps, numverts;