Allow negative sky colour to be specified

This commit is contained in:
2025-09-23 15:36:09 +01:00
parent e6ee20d5d1
commit cf876f4a8b
4 changed files with 11 additions and 6 deletions

6
rand.c
View File

@@ -22,7 +22,8 @@
static const vec3_t camera_pos = { -100.0, 30.0, -100.0 };
static const vec3_t target = { 0.0, 0.0, 0.0 };
static const vec3_t sky = { 0.6, 0.8, 1.0 };
static const vec3_t sky_pos = { 0.6, 0.8, 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 light = AREA_LIGHT(1.0, 0.8, 0.1, 4.0);
@@ -72,7 +73,8 @@ int main()
= camera_init(camera_pos, target, FOV, W, H, APERTURE, FOCAL_LEN);
const scene_t scene = {
.sky_colour = sky,
.sky_pos = sky_pos,
.sky_neg = sky_neg,
.objs = objs,
.obj_count = OBJ_COUNT,
};