From e77c9dc9354b715fc2d3894ee553caac3784b00c Mon Sep 17 00:00:00 2001 From: Aiden Gall Date: Tue, 6 Feb 2024 09:16:55 +0000 Subject: add fwd decls to spirt.cl --- src/cl/spirt.cl | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) { -- cgit v1.2.3