diff options
Diffstat (limited to 'src/kernel.cu')
-rw-r--r-- | src/kernel.cu | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kernel.cu b/src/kernel.cu index b7dadfa..6c3ef1b 100644 --- a/src/kernel.cu +++ b/src/kernel.cu @@ -267,7 +267,7 @@ __global__ void propagate(int nthreads, float3 *positions, float3 *directions, f int material_out_index = tex1Dfetch(material2_lookup, last_hit_triangle); int surface_index = tex1Dfetch(surface_lookup, last_hit_triangle); - float3 surface_normal = cross(v1-v0,v2-v0); + float3 surface_normal = cross(v1-v0,v2-v1); surface_normal /= norm(surface_normal); Material material1, material2; |