diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-01-13 15:32:01 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-01-13 15:32:01 -0500 |
commit | c552664a8371a55f2e082507998f78228308672c (patch) | |
tree | 93464a9820630ec2e63a2e53b8f7fab6ff6b28cd /libdimension/diffuse.c | |
parent | 6787a9219748575cd63aaadd483f49a4fd83b543 (diff) | |
download | dimension-c552664a8371a55f2e082507998f78228308672c.tar.xz |
Split finish_fn into diffuse_fn and specular_fn.
Diffstat (limited to 'libdimension/diffuse.c')
-rw-r--r-- | libdimension/diffuse.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libdimension/diffuse.c b/libdimension/diffuse.c index 4da51ee..895b918 100644 --- a/libdimension/diffuse.c +++ b/libdimension/diffuse.c @@ -29,8 +29,7 @@ static dmnsn_color dmnsn_diffuse_finish_fn(const dmnsn_finish *finish, dmnsn_color light, dmnsn_color color, - dmnsn_vector ray, dmnsn_vector normal, - dmnsn_vector viewer) + dmnsn_vector ray, dmnsn_vector normal) { double *diffuse = finish->ptr; double diffuse_factor = (*diffuse)*dmnsn_vector_dot(ray, normal); @@ -50,9 +49,9 @@ dmnsn_new_diffuse_finish(double diffuse) *param = diffuse; - finish->ptr = param; - finish->finish_fn = &dmnsn_diffuse_finish_fn; - finish->free_fn = &free; + finish->ptr = param; + finish->diffuse_fn = &dmnsn_diffuse_finish_fn; + finish->free_fn = &free; } return finish; } |