erebus

view liberebus/src/rt.cc @ 6:bb006fb96f1b

forgot to add two files
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 24 May 2014 02:22:14 +0300
parents
children e2d9bf168a41
line source
1 #include "rt.h"
3 Color ray_trace(const Ray &ray, const Scene *scn, int iter)
4 {
5 RayHit hit;
6 if(!(scn->intersect(ray, &hit))) {
7 return Color(0, 0, 0, 0);
8 }
10 return shade(hit, iter);
11 }
13 Color shade(const RayHit &hit, int iter)
14 {
15 return Color(1, 0, 0, 1);
16 }