aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2020-03-27 16:21:44 +0100
committerJulian T <julian@jtle.dk>2020-03-27 16:21:44 +0100
commit86848ec1abaec38435d93d99a80cd5476967bd23 (patch)
tree4d421ed64e3e022fbc95553983286f20476b7829 /main.c
parenta9651189ac52139c374f97a311d090a8d95b957e (diff)
Sphere light workingarea_light
Diffstat (limited to 'main.c')
-rw-r--r--main.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/main.c b/main.c
index 50d8829..9dd30d9 100644
--- a/main.c
+++ b/main.c
@@ -124,7 +124,7 @@ int main()
o->m = mpl;
o = add_object(cont, TYPE_PLANE);
- vector_set(&o->pl.start, 0, 0, -3);
+ vector_set(&o->pl.start, 0, 0, -5);
vector_set(&o->pl.norm, 0, 0, 1);
o->m = mpl;
@@ -144,18 +144,16 @@ int main()
o->m = mplred;
// Used for the light ball
- /*
o = add_object(cont, TYPE_SPHERE);
- vector_set(&o->sph.center, 2, 8, -2);
+ vector_set(&o->sph.center, 2, 7, 0);
o->sph.radius = 1;
o->m = ml;
- */
- light_t *l = add_light(cont, TYPE_L_POINT);
- vector_set(&l->point.pos, 2, 8, -1);
- //l->area = o;
+ light_t *l = add_light(cont, TYPE_L_AREA);
+ //vector_set(&l->point.pos, 2, 8, -1);
+ l->area = o;
color_set(&l->color, 1, 1, 1);
- l->radiance = 5;
+ l->radiance = 0.8;
pgm_write_header(stdout, TESTW, TESTH);