Fix Cycles compile errors with GCC due to double promotion as errors.
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user