From 9b40029e42f994aeff59ecc44a6d3b8fba93071d Mon Sep 17 00:00:00 2001 From: Julian T Date: Fri, 21 Feb 2020 14:42:42 +0100 Subject: Pretty realistic colors --- main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 011f2c1..0f0103a 100644 --- a/main.c +++ b/main.c @@ -19,6 +19,9 @@ int main() s.objects = NULL; s.lights = NULL; + material_t m; + vector_set(&m.color, 0, 1, 0); + vector_set(&s.view.position, 0, 15, 10); vector_set(&s.view.target, 0, 0, 0); s.view.width = TESTW; @@ -27,8 +30,8 @@ int main() viewpoint_init(&s.view); // Setup plane - add_sphere(&s, vector_set(NULL, 0, 0, 5), 5); - add_sphere(&s, vector_set(NULL, 10, 0, 5), 5); + add_sphere(&s, vector_set(NULL, 0, 0, 5), 5, &m); + //add_sphere(&s, vector_set(NULL, 10, 0, 5), 5); add_plane(&s, vector_set(NULL, 0, 0, 2), vector_set(NULL, 0, 0, 1)); add_light(&s, vector_set(NULL, 10, 0, 20), color_set(NULL, 255, 255, 255)); -- cgit v1.2.3