diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2021-01-17 20:54:11 +0100 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2021-01-17 20:54:11 +0100 |
| commit | 25125b2e23c02199bdefb3a638584465229fd833 (patch) | |
| tree | f52891f855f3cf78f3f97cd5c38fe23e55a0424d /include/utils.hpp | |
| parent | dfc9a9b37d544d3a357b560829d2a9a48e5e5f5b (diff) | |
Handle window resize
Diffstat (limited to 'include/utils.hpp')
| -rw-r--r-- | include/utils.hpp | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/include/utils.hpp b/include/utils.hpp index 42a5a1a..830b006 100644 --- a/include/utils.hpp +++ b/include/utils.hpp @@ -2,13 +2,37 @@ #define __UTILS_HPP_ #include <cstdint> - +#include <cstdlib> #include <vector> -#include <cstdlib> +#include "vec3.hpp" +#include "sphere.hpp" +#include "camera.hpp" + +struct input_data { + color sky_color; + color ground_color; + + camera cam; + + float random_offset[2000]; + float random_disk[2000]; + vec3 random_in_sphere[1000]; + + sphere spheres[512]; + + uint32_t max_bounce; + uint32_t samples_per_pixel; + + // Output image resolution + uint32_t width; + uint32_t height; +}; std::vector<uint8_t> get_shader_code(const char* path); +struct input_data create_inputs(uint32_t width, uint32_t height); + #define PI 3.14159265359 inline float deg_to_rad(float deg) { |
