diff options
Diffstat (limited to 'src/cl/spirt.cl')
-rw-r--r-- | src/cl/spirt.cl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cl/spirt.cl b/src/cl/spirt.cl index 1fe7bd0..136fd81 100644 --- a/src/cl/spirt.cl +++ b/src/cl/spirt.cl @@ -18,6 +18,16 @@ struct ray { float3 dir; }; +static float3 at(struct ray ray, float t); +static float length_squared(float3 v); + +__kernel void gen_rays(__global float3 *rays, float3 camera_centre, + float3 pixel_delta_u, float3 pixel_delta_v, + float3 corner00); + +static float hit_sphere(float3 center, float radius, struct ray ray); +__kernel void ray_colour(__global float *canvas, __global const float3 *rays); + static float3 at(const struct ray ray, const float t) { |