-
Notifications
You must be signed in to change notification settings - Fork 91
/
render-config.h
55 lines (40 loc) · 958 Bytes
/
render-config.h
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 RENDER_CONFIG_H
#define RENDER_CONFIG_H
#include <string>
#include <vector>
namespace example {
struct RenderLayer {
// color
std::vector<float> rgba;
// Stores # of samples for each pixel.
std::vector<int> sample_counts;
// For debugging. Array size = width * height * 4.
std::vector<float> normal;
std::vector<float> position;
std::vector<float> depth;
std::vector<float> texcoord;
std::vector<float> varycoord;
int width;
int height;
};
struct RenderConfig {
// framebuffer
int width;
int height;
// camera
float eye[3];
float up[3];
float look_at[3];
float fov; // vertical fov in degree.
// render pass
int pass;
int max_passes;
// Scene input info
std::string las_filename;
float scene_scale;
uint32_t max_points{~0u};
};
/// Loads config from JSON file.
bool LoadRenderConfig(example::RenderConfig *config, const char *filename);
} // namespace
#endif // RENDER_CONFIG_H