Remove focal_len parameter from camera (hard-code as 1.0)

This commit is contained in:
Camden Dixie O'Brien
2025-09-22 16:29:56 +01:00
parent 22a8b3a009
commit 6e8dd39d43
3 changed files with 8 additions and 9 deletions

4
demo.c
View File

@@ -7,7 +7,6 @@
#define W 800
#define H 600
#define FOCAL_LEN 1.0
#define FOV 120
#define SAMPLES_PER_PIXEL 100
@@ -31,8 +30,7 @@ static pix_t pixbuf[W * H];
int main()
{
img_t img = { .pix = pixbuf };
camera_t camera
= camera_init(camera_pos, FOCAL_LEN, FOV, W, H, SAMPLES_PER_PIXEL);
camera_t camera = camera_init(camera_pos, FOV, W, H, SAMPLES_PER_PIXEL);
camera_render(&camera, scene, NELEMS(scene), &img);
ff_write(STDOUT_FILENO, img);