summaryrefslogtreecommitdiff
path: root/src/modules/ray/ray.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@gnugeneration.com>2017-02-14 00:24:32 -0800
committerVito Caputo <vcaputo@gnugeneration.com>2017-02-14 00:46:17 -0800
commit8fc69c2b21dc101c04495c4689587e99a70cf875 (patch)
treeeb05dae0e2a145d6cbb97ad5c66f0d9e441184b5 /src/modules/ray/ray.c
parent2e300062591398269e27fe2b359ed28030bc788e (diff)
ray: add highlight exponent to ray_surface_t
Was a constant at 20, this allows it to be specified per-object.
Diffstat (limited to 'src/modules/ray/ray.c')
-rw-r--r--src/modules/ray/ray.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/ray/ray.c b/src/modules/ray/ray.c
index 6dc15a6..ad8a06b 100644
--- a/src/modules/ray/ray.c
+++ b/src/modules/ray/ray.c
@@ -24,6 +24,7 @@ static void ray(fb_fragment_t *fragment)
.color = { .x = 0.6, .y = 0.3, .z = 0.8 },
.diffuse = 1.0f,
.specular = 0.2f,
+ .highlight_exponent = 20.0f
},
.normal = { .x = 0.0, .y = 1.0, .z = 0.0 },
.distance = 2.0f,
@@ -35,6 +36,7 @@ static void ray(fb_fragment_t *fragment)
.color = { .x = 1.0, .y = 0.0, .z = 0.0 },
.diffuse = 1.0f,
.specular = 0.05f,
+ .highlight_exponent = 20.0f
},
.center = { .x = 0.5, .y = 1.0, .z = 0.0 },
.radius = 1.2f,
@@ -46,6 +48,7 @@ static void ray(fb_fragment_t *fragment)
.color = { .x = 0.0, .y = 0.0, .z = 1.0 },
.diffuse = 0.9f,
.specular = 0.4f,
+ .highlight_exponent = 20.0f
},
.center = { .x = -2.0, .y = 1.0, .z = 0.0 },
.radius = 0.9f,
@@ -57,6 +60,7 @@ static void ray(fb_fragment_t *fragment)
.color = { .x = 0.0, .y = 1.0, .z = 1.0 },
.diffuse = 0.9f,
.specular = 0.3f,
+ .highlight_exponent = 20.0f
},
.center = { .x = 2.0, .y = -1.0, .z = 0.0 },
.radius = 1.0f,
@@ -68,6 +72,7 @@ static void ray(fb_fragment_t *fragment)
.color = { .x = 0.0, .y = 1.0, .z = 0.0 },
.diffuse = 0.95f,
.specular = 0.85f,
+ .highlight_exponent = 20.0f
},
.center = { .x = 0.2, .y = -1.25, .z = 0.0 },
.radius = 0.6f,
© All Rights Reserved