summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-05-20 18:59:18 -0600
committerTavian Barnes <tavianator@gmail.com>2011-05-20 18:59:18 -0600
commit18b89c6edc29a009b1419e6d34bc3eef2dd911b9 (patch)
tree02f36651220fbd0821c94d6c13848bd9beb59098 /libdimension/dimension
parent250b980002419746fc099c7633b9600a15afb1c6 (diff)
downloaddimension-18b89c6edc29a009b1419e6d34bc3eef2dd911b9.tar.xz
Switch to Blender model of filtered transparency.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r--libdimension/dimension/color.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/libdimension/dimension/color.h b/libdimension/dimension/color.h
index 504ec47..be5dc3d 100644
--- a/libdimension/dimension/color.h
+++ b/libdimension/dimension/color.h
@@ -31,10 +31,8 @@ typedef struct {
double G; /**< sRGB green value. */
double B; /**< sRGB blue value. */
- /** Filtered transparency. */
- double filter;
- /** Unfiltered transparency; <tt>filter + trans</tt> should be <= 1. */
- double trans;
+ double trans; /**< Translucency. */
+ double filter; /**< Degree of filtering. */
} dmnsn_color;
/* Standard colors */
@@ -61,9 +59,9 @@ dmnsn_new_color(double R, double G, double B)
/** Construct a new color with transparent components. */
DMNSN_INLINE dmnsn_color
-dmnsn_new_color5(double R, double G, double B, double filter, double trans)
+dmnsn_new_color5(double R, double G, double B, double trans, double filter)
{
- dmnsn_color ret = { R, G, B, filter, trans };
+ dmnsn_color ret = { R, G, B, trans, filter };
return ret;
}