diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-07 03:34:47 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-07 03:34:47 +0400 |
commit | d58a38508469f336a4aef9632b182722758aa29b (patch) | |
tree | b20d6b9bd23405b2b47b59f8e01f3a190c6dc70a /intern/cycles/render/blackbody.cpp | |
parent | 3c8cdb8c6813c8ef9655054948419fb51c7af09f (diff) |
minor edits to float/double conversion suggested by DingTo
Diffstat (limited to 'intern/cycles/render/blackbody.cpp')
-rw-r--r-- | intern/cycles/render/blackbody.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/render/blackbody.cpp b/intern/cycles/render/blackbody.cpp index 72e3e5d938d..6782df10006 100644 --- a/intern/cycles/render/blackbody.cpp +++ b/intern/cycles/render/blackbody.cpp @@ -100,7 +100,7 @@ vector<float> blackbody_table() /* ToDo: bring this back to what OSL does with the lastTemperature limit ? */ for (int i = 0; i <= 317; ++i) { - double Temperature = pow((double)i, BB_TABLE_XPOWER) * BB_TABLE_SPACING + BB_DRAPPER; + double Temperature = pow((double)i, BB_TABLE_XPOWER) * (double)BB_TABLE_SPACING + (double)BB_DRAPPER; X = 0; Y = 0; Z = 0; @@ -125,9 +125,9 @@ vector<float> blackbody_table() /* Clamp to zero if values are smaller */ col = max(col, make_float3(0.0f, 0.0f, 0.0f)); - col.x = powf(col.x, 1.0 / BB_TABLE_YPOWER); - col.y = powf(col.y, 1.0 / BB_TABLE_YPOWER); - col.z = powf(col.z, 1.0 / BB_TABLE_YPOWER); + col.x = powf(col.x, 1.0f / BB_TABLE_YPOWER); + col.y = powf(col.y, 1.0f / BB_TABLE_YPOWER); + col.z = powf(col.z, 1.0f / BB_TABLE_YPOWER); /* Store in table in RRRGGGBBB format */ blackbody_table[i] = col.x; |