summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-11-17 19:08:00 -0500
committerTavian Barnes <tavianator@gmail.com>2009-11-17 19:08:00 -0500
commit324de43f622ace14a51384cdf8bb7bb190b58699 (patch)
treeb72aa30713627c15f352894ea0a366373f1d43e4 /tests
parent9f36c26a7f75a58564f60878c42381b451d7d7ba (diff)
downloaddimension-324de43f622ace14a51384cdf8bb7bb190b58699.tar.xz
Implement phong shading.
Diffstat (limited to 'tests')
-rw-r--r--tests/libdimension/tests.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/libdimension/tests.c b/tests/libdimension/tests.c
index fe914f4..e5d4a06 100644
--- a/tests/libdimension/tests.c
+++ b/tests/libdimension/tests.c
@@ -31,7 +31,13 @@ dmnsn_new_default_scene()
}
/* Default finish */
- scene->default_texture->finish = dmnsn_new_diffuse_finish();
+
+ scene->default_texture->finish = dmnsn_new_phong_finish(1.0, 0.5, 50.0);
+ if (!scene->default_texture->finish) {
+ dmnsn_delete_scene(scene);
+ return NULL;
+ }
+
scene->default_texture->finish->ambient = 0.1;
/* Background color */
@@ -116,7 +122,7 @@ dmnsn_new_default_scene()
/* Now make a light */
dmnsn_light *light = dmnsn_new_point_light(
- dmnsn_vector_construct(-5.0, 20.0, -5.0),
+ dmnsn_vector_construct(-15.0, 20.0, -5.0),
dmnsn_white
);
if (!light) {