summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnthony LaTorre <tlatorre9@gmail.com>2011-07-26 21:10:10 -0400
committerAnthony LaTorre <tlatorre9@gmail.com>2011-07-26 21:10:10 -0400
commit8eec1bd5fd39b3991f660726cf41dc899347a81f (patch)
tree8a3b02ac284c42c18e008e1313a3f2094fcfb2ed /src
parent0716c8af5be04ea1709ca178d5341e5ee3df607b (diff)
downloadchroma-8eec1bd5fd39b3991f660726cf41dc899347a81f.tar.gz
chroma-8eec1bd5fd39b3991f660726cf41dc899347a81f.tar.bz2
chroma-8eec1bd5fd39b3991f660726cf41dc899347a81f.zip
added a camera class which is able to render using the simple ray tracer or the hybrid monte carlo ray tracer in a separate thread. the camera object is initialized by passing a pycuda.driver.Context object and a threading.Lock object; you can then run kernels and copy arrays to and from the device in the same context as that used by the camera by acquiring the lock, calling context.push(), executing the kernel and/or copying arrays, calling context.pop(), and then releasing the lock. fixed mistakes in both build_rgb_lookup() and render() where I had accidently switched the green and blue photons. updated the lbne geometry with the latest specifications. added profiles for the sno pmt and concentrator.
Diffstat (limited to 'src')
-rw-r--r--src/kernel.cu10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/kernel.cu b/src/kernel.cu
index 0dc5639..ffd2d88 100644
--- a/src/kernel.cu
+++ b/src/kernel.cu
@@ -10,7 +10,7 @@
#include "alpha.h"
#define RED_WAVELENGTH 685
-#define BLUE_WAVELENGTH 465
+#define BLUE_WAVELENGTH 445
#define GREEN_WAVELENGTH 545
__device__ void fAtomicAdd(float *addr, float data)
@@ -147,7 +147,7 @@ __global__ void build_rgb_lookup(int nthreads, curandState *rng_states, float3 *
}
p = seed;
- p.wavelength = BLUE_WAVELENGTH;
+ p.wavelength = GREEN_WAVELENGTH;
to_diffuse(p, s, rng, max_steps);
@@ -164,7 +164,7 @@ __global__ void build_rgb_lookup(int nthreads, curandState *rng_states, float3 *
}
p = seed;
- p.wavelength = GREEN_WAVELENGTH;
+ p.wavelength = BLUE_WAVELENGTH;
to_diffuse(p, s, rng, max_steps);
@@ -227,7 +227,7 @@ __global__ void render(int nthreads, curandState *rng_states, float3 *positions,
}
p = seed;
- p.wavelength = BLUE_WAVELENGTH;
+ p.wavelength = GREEN_WAVELENGTH;
to_diffuse(p, s, rng, max_steps);
@@ -244,7 +244,7 @@ __global__ void render(int nthreads, curandState *rng_states, float3 *positions,
}
p = seed;
- p.wavelength = GREEN_WAVELENGTH;
+ p.wavelength = BLUE_WAVELENGTH;
to_diffuse(p, s, rng, max_steps);