From 294cd72ee78f41d7692b2ff8216ce5b155084ae1 Mon Sep 17 00:00:00 2001 From: dvdrw Date: Sun, 3 Dec 2023 21:56:53 +0100 Subject: [PATCH] tweak lights to make scene more interesting --- src/main.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 2ca9169..9aa3061 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -11,8 +11,8 @@ #include static std::vector lights { - new Light(v3{0, 0, 19}, 2, v3{1, 1, 1}), - new Light(v3{-7, 15, 0}, 2, v3{1, 1, 1}), + new Light(v3{0, 0, 19}, 2, v3{2, 1, 1}), + new Light(v3{-7, 15, 0}, 2, v3{1, 2, 2}), new Light(v3{17, -9, 16}, 2, v3{1, 1, 1}), // new Light(v3{0, 0, 19}, 2, v3{0.8, 0.8, 0.9}), @@ -22,17 +22,17 @@ static std::vector lights { static const Material PLANE_MAT = { .specular = 0.12, - .roughness = 0.55, + .roughness = 0.75, .ior = 2, .transparency = 0, - .colour = {1, 1, 1}, + .colour = {1, 0, 1}, }; static const Material SPHERE_MAT_TRANS = { .specular = 0.85, .roughness = 0.5, .ior = 1.2, - .transparency = 0.95, + .transparency = 0.75, .colour = {0, 1, 0}, }; @@ -60,8 +60,6 @@ static std::vector objects static std::vector scene; -// static constexpr int W = 294*2, H = 82*2; -// static constexpr int W = 2 * 640 * 2.9 * 1.8, H = 2 * 480 * 1.5 * 2.5; static constexpr int W = 2*80, H = 2*24; static constexpr choice_t ASPECT_RATIO = W/(H * 1.9); @@ -152,7 +150,8 @@ int main() camera.zoom /= 1.015; break; case 'p': - printf("pos: " V3_FMT "\nrot: " V3_FMT, V3_ARG(camera.pos), V3_ARG(camera.rotation)); + printf("pos: " V3_FMT, V3_ARG(camera.pos)); + printf("\nrot: " V3_FMT, V3_ARG(camera.rotation)); break; case '\n': case 'q':