primary rays without jitter
[cyberay] / src / rt.h
1 #ifndef RT_H_
2 #define RT_H_
3
4 #include <cgmath/cgmath.h>
5 #include "image.h"
6 #include "tpool.h"
7
8 struct material {
9         cgm_vec3 color;
10         float roughness;
11         float ior;
12
13         struct image *tex_color;
14 };
15
16 struct framebuffer {
17         int width, height;
18         cgm_vec3 *pixels;
19 };
20
21 extern struct framebuffer fb;
22 extern struct thread_pool *tpool;
23 extern float view_xform[16];
24
25 int fbsize(int width, int height);
26
27 void render(void);
28
29 #endif  /* RT_H_ */