Add fuzz parameter to reflective material

This commit is contained in:
2025-09-23 15:36:08 +01:00
parent 1e31fae5d0
commit 90240ee5ad
3 changed files with 12 additions and 6 deletions

View File

@@ -10,10 +10,10 @@
.params = { .lambertian = { .albedo = { r, g, b } } }, \
}
#define REFLECTIVE(r, g, b) \
#define REFLECTIVE(r, g, b, f) \
{ \
.scatter = scatter_reflective, \
.params = { .reflective = { .tint = { r, g, b } } }, \
.params = { .reflective = { .tint = { r, g, b }, .fuzz = f } }, \
}
#define DIELECTRIC(e) \
@@ -34,6 +34,7 @@ typedef struct {
typedef struct {
vec3_t tint;
double fuzz;
} reflective_params_t;
typedef struct {