diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-06-23 11:47:52 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2014-06-23 11:47:52 +0400 |
commit | 8cea610e74f4041388cd0a926de08abcea9d4092 (patch) | |
tree | 2915e0f3bde2e1680165b12df68a994b9927e3df /intern/cycles/render | |
parent | 95d6c014780a980ed9f1552edd4196ceefbce9b6 (diff) |
Fix compiler error in Cycles Beckmann sampling precomputation: strict
compiler flags don't allow implicit double -> float casting.
Code was added in rB8fbd71e.
Diffstat (limited to 'intern/cycles/render')
-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 87107ae642d..b9685807e16 100644 --- a/intern/cycles/render/shader.cpp +++ b/intern/cycles/render/shader.cpp @@ -68,13 +68,13 @@ static void beckmann_table_rows(float *table, int row_from, int row_to) slope_x[index_slope_x] = -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, -slope_x[index_slope_x]*sin_theta + cos_theta); + float dot_product = fmaxf(0.0f, -(float)slope_x[index_slope_x]*sin_theta + cos_theta); /* marginalize P22_{omega_i}(x_slope, 1, 1), Eq. (10) */ float P22_omega_i = 0.0f; for(int j = 0; j < 100; ++j) { float slope_y = -beckmann_table_slope_max() + 2.0f * beckmann_table_slope_max() * j * (1.0f/99.0f); - P22_omega_i += dot_product * beckmann_table_P22(slope_x[index_slope_x], slope_y); + P22_omega_i += dot_product * beckmann_table_P22((float)slope_x[index_slope_x], slope_y); } /* CDF of P22_{omega_i}(x_slope, 1, 1), Eq. (10) */ |