aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to 'template')
-rw-r--r--template/opengl.mako2
1 files changed, 1 insertions, 1 deletions
diff --git a/template/opengl.mako b/template/opengl.mako
index 50cdbbc..52699d5 100644
--- a/template/opengl.mako
+++ b/template/opengl.mako
@@ -115,7 +115,7 @@ __kernel void collect_gl_moments_to_texture(__global __read_only ${float_type}*
if (material_up != 5) { n.z = -1; }
if (material_down != 5) { n.z = 1; }
- data.xyz = 0.5 + 0.5*n; // pack surface normal into texture
+ data.xyz = normalize(n);
data.w = 1.0; // signal impermeable material to raytracer
}