From bfbe9e43e108f6816c17b9b7764b75284ac78313 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 14 Dec 2011 19:27:22 -0500 Subject: Re-think colors. Color is a property of light, and thus doesn't include information about transparency. But canvas pixels and object pigments represent a color and a degree of transparency. The new type dmnsn_tcolor/ TColor encapsulates that information. Also, fix the transparent shadow implementation. --- libdimension/lambertian.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'libdimension/lambertian.c') diff --git a/libdimension/lambertian.c b/libdimension/lambertian.c index 8227cc5..16dc910 100644 --- a/libdimension/lambertian.c +++ b/libdimension/lambertian.c @@ -35,11 +35,7 @@ dmnsn_lambertian_diffuse_fn(const dmnsn_diffuse *diffuse, { double *coeff = diffuse->ptr; double diffuse_factor = fabs((*coeff)*dmnsn_vector_dot(ray, normal)); - dmnsn_color ret - = dmnsn_color_mul(diffuse_factor, dmnsn_color_illuminate(light, color)); - ret.filter = 0.0; - ret.trans = 0.0; - return ret; + return dmnsn_color_mul(diffuse_factor, dmnsn_color_illuminate(light, color)); } dmnsn_diffuse * -- cgit v1.2.3