   return d * l + l0;
 }
 
-vec4 rayColidesWithBox(Ray ray) {
+vec4 boxCollisionAndNormal(Ray ray) {
   vec2 xy = vec2(1.0, 0.0);
 
   // w is negative flag for later

}

vec3 render(Ray ray) {
  vec4 normalAndCollision = rayColidesWithBox(ray);
  bool collides = normalAndCollision.w == 1.0;

  if (collides) {
    vec3 normalVector = normalAndCollision.xyz;

    vec3 reflectionVector = reflect(ray.direction, normalVector);
    vec3 reflectionColor = checkerboard(reflectionVector);

    float rf = pow(1.0 - 0.8 * abs(dot(ray.direction, normalVector)), 3.0) * 1.0;

    return reflectionColor * rf;
  }

  return vec3(
    10.0 * sin(TIME / 6.0),
    10.0 * cos(TIME / 6.0),
    10.0 * sin(TIME / 2.0)
  );
}

