diff options
author | Aiden Gall <aiden@aidengall.xyz> | 2024-02-06 09:16:55 +0000 |
---|---|---|
committer | Aiden Gall <aiden@aidengall.xyz> | 2024-02-06 09:16:55 +0000 |
commit | e77c9dc9354b715fc2d3894ee553caac3784b00c (patch) | |
tree | 7bf8b6f496b248818e748169155052fc0f9698ec | |
parent | aee4cbae83d93f5bd04470b784afd2c262be9844 (diff) |
add fwd decls to 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) { |