From ca7f65d7cc2d82ce1bd752785fd100a1855b4dc3 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Fri, 1 Jan 2021 20:48:57 +0100 Subject: Hit function return hit struct --- src/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 97624ea..b769dd3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -81,8 +81,9 @@ int main() { vkrenderer renderer {}; // Image dimensions - const float aspect_ratio = 16.0 / 9.0; - const size_t width = 1920; + // const float aspect_ratio = 16.0 / 9.0; + const float aspect_ratio = 1.0 / 1.0; + const size_t width = 400; const size_t height = width / aspect_ratio; const uint32_t samples_per_pixel = 1; const uint32_t max_depth = 100; @@ -100,7 +101,8 @@ int main() { .viewport_width = 2.f * aspect_ratio, .viewport_height = 2.f, .proj_plane_distance = 1.f, - .sphere_position = { 0.f, 0.f, -1.f }, + .sphere = { { 0.f, 0.f, -1.f }, 0.5f }, + // .sphere = { { 0.f, -100.5f, -1.f }, 100.f }, }; // World hittable objects -- cgit v1.3