diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cl/spirt.cl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cl/spirt.cl b/src/cl/spirt.cl index f55aa74..1fe7bd0 100644 --- a/src/cl/spirt.cl +++ b/src/cl/spirt.cl @@ -35,18 +35,19 @@ gen_rays(__global float3 *const rays, const float3 camera_centre, const float3 pixel_delta_u, const float3 pixel_delta_v, const float3 corner00) { - size_t idx, w, i, j; + __global float3 *ray; + size_t w, i, j; w = get_global_size(0); i = get_global_id(0); j = get_global_id(1); - idx = (w * j + i) * 2; + ray = rays + 2 * (w * j + i); - rays[idx] = camera_centre; - rays[idx + 1] = corner00 + ((i * pixel_delta_u) + (j * pixel_delta_v)) - - camera_centre; + ray[0] = camera_centre; + ray[1] = corner00 + ((i * pixel_delta_u) + (j * pixel_delta_v)) - + camera_centre; } static float |