diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-01-09 06:48:31 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-01-09 06:48:31 +0300 |
commit | 14de8361f97c64b3d99b6e009fc8e9d19f90a328 (patch) | |
tree | dba055bfafa306a055958f4a8d2a2fb3bd54fbdc /source/blender/blenlib/BLI_math_color.h | |
parent | d7da51b7277252d887cd93b1ac26bfe4ee25ad44 (diff) |
Smoke (fire): Move spectrum code from C++ (intern/) to C code (BLI)
This change is for a few reasons:
- it works with color, and (therefore) will need to be color managed, at
some point. This will be much easier to do if the code is closer to the
actual color management code (in Blender's core, so to speak).
- it has nothing to do with the actual fire simulation, as it is just
used to create a lookup table
- it can be reused for other purposes (i.e. in Blender internal
renderer, if people are interrested in a blackbody node à la Cycles)
- cleanup: some functions (`contrain_rgb`, `xyz_to_rgb`) already exist
in BLI
Reviewers: brecht
Reviewed By: brecht
Subscribers: brecht
Differential Revision: https://developer.blender.org/D1719
Diffstat (limited to 'source/blender/blenlib/BLI_math_color.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_color.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_color.h b/source/blender/blenlib/BLI_math_color.h index d70dfcd9e58..5e6b1256d30 100644 --- a/source/blender/blenlib/BLI_math_color.h +++ b/source/blender/blenlib/BLI_math_color.h @@ -145,6 +145,8 @@ MINLINE void rgba_char_args_set(char col[4], const char r, const char g, const c MINLINE void rgba_char_args_test_set(char col[4], const char r, const char g, const char b, const char a); MINLINE void cpack_cpy_3ub(unsigned char r_col[3], const unsigned int pack); +void blackbody_temperature_to_rgb_table(float *r_table, int width, float min, float max); + /********* lift/gamma/gain / ASC-CDL conversion ***********/ void lift_gamma_gain_to_asc_cdl(float *lift, float *gamma, float *gain, float *offset, float *slope, float *power); |