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. --- dimension/tests/demo.dmnsn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dimension') diff --git a/dimension/tests/demo.dmnsn b/dimension/tests/demo.dmnsn index 75a97a7..2d51400 100644 --- a/dimension/tests/demo.dmnsn +++ b/dimension/tests/demo.dmnsn @@ -31,9 +31,9 @@ except OSError: background = PigmentMap( pattern = Gradient(Y), - map = { + map = { 0: image_map, - 0.35: sRGB(0, 0.1, 0.2, trans = 0.1, filter = 0.0), + 0.35: TColor(sRGB(0, 0.1, 0.2), trans = 0.1) }, ) @@ -50,7 +50,7 @@ hollow_cube = Difference( (-1, -1, -1), (1, 1, 1), texture = Texture( - pigment = sRGB(0, 0, 1, trans = 0.75, filter = 1/3), + pigment = TColor(Blue, trans = 0.75, filter = 1/3), finish = Reflection(min = 0, max = sRGB(0.5)), ), interior = Interior( @@ -63,7 +63,7 @@ hollow_cube = Difference( center = 0, radius = 1.25, texture = Texture( pigment = Green, - finish = Phong(strength = 0.2, size = 40), + finish = Phong(strength = sRGB(0.2), size = 40), ), ) ], -- cgit v1.2.3