-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.hpp
55 lines (44 loc) · 849 Bytes
/
main.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef TRAYCER_MAIN_HPP
#define TRAYCER_MAIN_HPP
#include <glm/glm/vec3.hpp>
#include "types.hpp"
#define FILEPATH_BUFFER_SIZE 4096
struct Config {
char *scene_filepath;
uint jitter;
uint bounces;
uint extra_lights_per_light;
char render_filepath[FILEPATH_BUFFER_SIZE];
};
enum RgbChannel {
kRgbChannel_Red,
kRgbChannel_Green,
kRgbChannel_Blue,
kRgbChannel__Count
};
struct Ray {
glm::vec3 position;
glm::vec3 direction;
};
enum SurfaceType {
kSurfaceType_Sphere,
kSurfaceType_Triangle,
kSurfaceType__Count
};
struct TriangleIntersection {
float alpha;
float beta;
float gamma;
};
struct Intersection {
SurfaceType type;
uint index;
float t;
TriangleIntersection triangle;
};
enum RenderTarget {
kRenderTarget_Window,
kRenderTarget_Jpeg,
kRenderTarget__Count
};
#endif // TRAYCER_MAIN_HPP