Why do I get this arbitrary syntax error?

71 Views Asked by At

I'm learning GLSL, and I thought it might be a fun project to build a simple raytracer. I can't figure out why I get a weird syntax error on this function:

vec3 rayAt(in ray r, in float t)
{
    return r.o + t*r.d;
}

For context, r.o and r.d are components of this struct:

struct ray
{
    vec3 o;
    vec3 d;
}

Edit: I'm writing this on shadertoy, and the specific error I get is 'vec3' : syntax error

0

There are 0 best solutions below