summaryrefslogtreecommitdiffstats
path: root/Smoke/palette.c
diff options
context:
space:
mode:
Diffstat (limited to 'Smoke/palette.c')
-rw-r--r--Smoke/palette.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/Smoke/palette.c b/Smoke/palette.c
index 91b944f..a17c143 100644
--- a/Smoke/palette.c
+++ b/Smoke/palette.c
@@ -155,30 +155,14 @@ static struct color4f trip_like_i_do(float value)
return return_value;
}
+
static struct color4f colormap_fire(float value)
{
struct color4f return_value;
- /* Colormap Fire
- * A fire effect deals with two parts, first a drop from red to yellow (halfway)
- * during which time the Red component remains full e.g. 1. The Green component is
- * slowly added to turn the red into orange, and then yellow (R & G =Y). After this
- * point, the Red and Green component (e.g. yellow) have to drop simulataniously
- * to go from yellow down to black.
- */
- return_value.r = 0;
- return_value.b = 0;
- return_value.g = 0;
- if (value <= (0.01)) {
- /* whilst value is 0 - 0.5 both red and green equally change to create yellow */
- return_value.r = return_value.g = value;
- } else {
- /* whilst value is 0.5 - 1 Red is always fully on while the Green component is
- * added in steps to go from red to orange to yellow.
- */
- return_value.g = 0.9f - value;
- return_value.r = 0.8f; // not 1, makes red deeper, more intense
- }
+ return_value.r = value;
+ return_value.g = value / 5.0f;
+ return_value.b = 0.0f;
return return_value;
}