Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2016-05-22 20:11:26 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2016-05-22 20:17:22 +0300
commitf7c28a66e282eb9eb66bd02ccfe985beb6cb6f90 (patch)
treecea0ed8514901c819572c06066f81eac94d7c780 /intern/cycles/render
parent2f978656ab7d076706ef458ddd7674a6f653cad8 (diff)
Fix Cycles compile errors with GCC due to double promotion as errors.
Diffstat (limited to 'intern/cycles/render')
-rw-r--r--intern/cycles/render/nodes.cpp4
-rw-r--r--intern/cycles/render/shader.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index 110bbca8576..998d9cf31dd 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -718,11 +718,11 @@ static void sky_texture_precompute_new(SunSky *sunsky, float3 dir, float turbidi
sunsky->theta = theta;
sunsky->phi = phi;
- double solarElevation = M_PI_2_F - theta;
+ float solarElevation = M_PI_2_F - theta;
/* Initialize Sky Model */
ArHosekSkyModelState *sky_state;
- sky_state = arhosek_xyz_skymodelstate_alloc_init(turbidity, ground_albedo, solarElevation);
+ sky_state = arhosek_xyz_skymodelstate_alloc_init((double)turbidity, (double)ground_albedo, (double)solarElevation);
/* Copy values from sky_state to SunSky */
for(int i = 0; i < 9; ++i) {
diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp
index b140af66b5b..635024d7bdf 100644
--- a/intern/cycles/render/shader.cpp
+++ b/intern/cycles/render/shader.cpp
@@ -69,12 +69,12 @@ static void beckmann_table_rows(float *table, int row_from, int row_to)
/* for a given incident vector
* integrate P22_{omega_i}(x_slope, 1, 1), Eq. (10) */
- slope_x[0] = -beckmann_table_slope_max();
+ slope_x[0] = (double)-beckmann_table_slope_max();
CDF_P22_omega_i[0] = 0;
for(int index_slope_x = 1; index_slope_x < DATA_TMP_SIZE; ++index_slope_x) {
/* slope_x */
- slope_x[index_slope_x] = -beckmann_table_slope_max() + 2.0f * beckmann_table_slope_max() * index_slope_x/(DATA_TMP_SIZE - 1.0f);
+ slope_x[index_slope_x] = (double)(-beckmann_table_slope_max() + 2.0f * beckmann_table_slope_max() * index_slope_x/(DATA_TMP_SIZE - 1.0f));
/* dot product with incident vector */
float dot_product = fmaxf(0.0f, -(float)slope_x[index_slope_x]*sin_theta + cos_theta);