From f7c28a66e282eb9eb66bd02ccfe985beb6cb6f90 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 22 May 2016 19:11:26 +0200 Subject: Fix Cycles compile errors with GCC due to double promotion as errors. --- intern/cycles/render/shader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'intern/cycles/render/shader.cpp') 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); -- cgit v1.2.3