1 #ifndef RENDER_CONFIG_H 2 #define RENDER_CONFIG_H 3 4 #include <string> 5 #include <vector> 6 7 namespace example { 8 9 typedef struct { 10 // color 11 std::vector<float> rgba; 12 13 // Stores # of samples for each pixel. 14 std::vector<int> sample_counts; 15 16 // For debugging. Array size = width * height * 4. 17 std::vector<float> normal; 18 std::vector<float> position; 19 std::vector<float> depth; 20 std::vector<float> texcoord; 21 std::vector<float> varycoord; 22 23 int width; 24 int height; 25 26 } RenderLayer; 27 28 typedef struct { 29 // framebuffer 30 int width; 31 int height; 32 33 // camera 34 float eye[3]; 35 float up[3]; 36 float look_at[3]; 37 float fov; // vertical fov in degree. 38 39 // render pass 40 int pass; 41 int max_passes; 42 43 // Scene input info 44 std::string gltf_filename; 45 float scene_scale; 46 47 } RenderConfig; 48 49 /// Loads config from JSON file. 50 bool LoadRenderConfig(example::RenderConfig *config, const char *filename); 51 52 } // namespace 53 54 #endif // RENDER_CONFIG_H 55