diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-05-22 20:11:26 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-05-22 20:17:22 +0300 |
commit | f7c28a66e282eb9eb66bd02ccfe985beb6cb6f90 (patch) | |
tree | cea0ed8514901c819572c06066f81eac94d7c780 /intern/cycles/render/shader.cpp | |
parent | 2f978656ab7d076706ef458ddd7674a6f653cad8 (diff) |
Fix Cycles compile errors with GCC due to double promotion as errors.
Diffstat (limited to 'intern/cycles/render/shader.cpp')
-rw-r--r-- | intern/cycles/render/shader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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); |