From ee3c4d4a1a0eff9a44b628a98cc789b25f7219ee Mon Sep 17 00:00:00 2001 From: Keuin Date: Wed, 20 Apr 2022 00:49:01 +0800 Subject: Add OVERRIDE_FOV for simply test FOV. --- main_simple_scanner.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/main_simple_scanner.cpp b/main_simple_scanner.cpp index e3aedc6..99e166c 100644 --- a/main_simple_scanner.cpp +++ b/main_simple_scanner.cpp @@ -23,7 +23,10 @@ //#define SCENE_REFLECT #define SCENE_DIALECT +//#define OVERRIDE_FOV + static constexpr uint64_t default_diffuse_seed = 123456789012345678ULL; +static constexpr double fov_override = 90*(M_PI/180); // T: color depth, V: pos template @@ -39,6 +42,7 @@ void generate_image(uint16_t image_width, uint16_t image_height, double viewport double r = 1.0 * image_width / image_height; hitlist world; +#ifndef OVERRIDE_FOV //////////////// // noaa rendering bias_ctx no_bias{}; @@ -61,6 +65,31 @@ void generate_image(uint16_t image_width, uint16_t image_height, double viewport world, samples }; //////////////// +#else + //////////////// + // noaa rendering + bias_ctx no_bias{}; + basic_viewport vp_noaa{ + vec3::zero(), // camera position as the coordinate origin + vec3d{0, 0, -focal_length}, + image_width, image_height, + fov_override, + world + }; + //////////////// + + //////////////// + // aa rendering + aa_viewport vp_aa{ + vec3::zero(), // camera position as the coordinate origin + vec3d{0, 0, -focal_length}, + image_width, image_height, + fov_override, + world, samples + }; + //////////////// +#endif + #ifdef SCENE_DIFFUSE material_diffuse_lambertian materi{0.5}; world.add_object(std::make_shared( -- cgit v1.2.3