diff options
author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-08-15 15:51:38 -0400 |
---|---|---|
committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-08-15 15:51:38 -0400 |
commit | 1913c9cbed2ce6404c2a9650b49e400918a94df5 (patch) | |
tree | 8efb13871455583af4f68c2bddaa9e2e77ef668b /src | |
parent | 999b22bae78169a9b273b5b23ebf57ef31b20e5a (diff) | |
download | chroma-1913c9cbed2ce6404c2a9650b49e400918a94df5.tar.gz chroma-1913c9cbed2ce6404c2a9650b49e400918a94df5.tar.bz2 chroma-1913c9cbed2ce6404c2a9650b49e400918a94df5.zip |
woops. dot product should be clamped to [-1.0,1.0].
Diffstat (limited to 'src')
-rw-r--r-- | src/photon.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/photon.h b/src/photon.h index 6cf3367..fb29ffe 100644 --- a/src/photon.h +++ b/src/photon.h @@ -52,7 +52,7 @@ enum {BREAK, CONTINUE, PASS}; // return value from propagate_to_boundary __device__ float get_theta(const float3 &a, const float3 &b) { - return acosf(fmaxf(0.0f,fminf(1.0f,dot(a,b)))); + return acosf(fmaxf(-1.0f,fminf(1.0f,dot(a,b)))); } __device__ void fill_state(State &s, Photon &p) |