Make samples per pixel a camera parameter

This commit is contained in:
Camden Dixie O'Brien
2025-09-22 16:04:05 +01:00
parent a71aa553db
commit 524f8ad085
3 changed files with 12 additions and 10 deletions

View File

@@ -11,11 +11,12 @@ typedef struct {
vec3_t pos;
vec3_t pix_origin, x_step, y_step;
uint32_t img_width, img_height;
unsigned samples_per_pixel;
} camera_t;
camera_t camera_init(
vec3_t pos, double focal_len, double viewport_height, uint32_t img_width,
uint32_t img_height);
uint32_t img_height, unsigned samples_per_pixel);
void camera_render(
const camera_t *camera, const obj_t *scene, unsigned scene_count,