Tweak demo scene

This commit is contained in:
Camden Dixie O'Brien
2025-09-23 15:35:26 +01:00
parent f386270842
commit c8ca24e572

12
demo.c
View File

@@ -3,24 +3,24 @@
#include <unistd.h> #include <unistd.h>
#define W 1280 #define W 1920
#define H 720 #define H 1080
#define FOV 90 #define FOV 90
#define APERTURE 0.8 #define APERTURE 0.8
#define FOCAL_LEN -1 #define FOCAL_LEN -1
#define SAMPLES_PER_PIXEL 100 #define SAMPLES_PER_PIXEL 1000
#define NELEMS(arr) (sizeof(arr) / sizeof(arr[0])) #define NELEMS(arr) (sizeof(arr) / sizeof(arr[0]))
static const vec3_t camera_pos = { 80.0, 30.0, 60.0 }; static const vec3_t camera_pos = { 80.0, 20.0, 60.0 };
static const vec3_t target = { 0.0, 0.0, 10.0 }; static const vec3_t target = { 0.0, 0.0, 10.0 };
static const vec3_t sky_pos = { 0.6, 0.8, 1.0 }; static const vec3_t sky_pos = { 0.4, 0.7, 1.0 };
static const vec3_t sky_neg = { 1.0, 1.0, 1.0 }; static const vec3_t sky_neg = { 1.0, 1.0, 1.0 };
static const material_t floor = LAMBERTIAN(1.0, 0.94, 0.80); static const material_t floor = LAMBERTIAN(1.0, 0.94, 0.80);
static const material_t light = AREA_LIGHT(1.0, 0.8, 0.5, 4.0); static const material_t light = AREA_LIGHT(1.0, 0.8, 0.5, 3.0);
static const material_t white = LAMBERTIAN(1.0, 1.0, 1.0); static const material_t white = LAMBERTIAN(1.0, 1.0, 1.0);
static const material_t gold = REFLECTIVE(1.0, 0.9, 0.5, 0.0); static const material_t gold = REFLECTIVE(1.0, 0.9, 0.5, 0.0);
static const material_t silver = REFLECTIVE(0.9, 0.9, 0.9, 0.0); static const material_t silver = REFLECTIVE(0.9, 0.9, 0.9, 0.0);