diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-07-10 15:42:38 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-07-10 17:04:03 +0400 |
commit | 5e216a6aa9bb7ea6c643d5b873cfae871d434925 (patch) | |
tree | 1f9a3e87a331cee250488a80e96c9e3872eb5b99 | |
parent | 19f89a083f25c2d69619cfef7df5817d86292ccd (diff) |
Fix T41005: Seemingly random crashes with cycles rendering
Fix T41013: OSL and Crash
Fix T40989: Intermittent crash clicking material color selector
Issue was caused by not enough precision for inversion threshold.
Use double precision for this threshold now. We might want to
investigate this code a bit more further, stock implementation
uses doubles for all computation. Using floats might be a reason
of bad rows distribution in theory.
-rw-r--r-- | intern/cycles/render/shader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp index b9685807e16..351efcac7a8 100644 --- a/intern/cycles/render/shader.cpp +++ b/intern/cycles/render/shader.cpp @@ -89,7 +89,7 @@ static void beckmann_table_rows(float *table, int row_from, int row_to) int index_slope_x = 0; for(int index_U = 0; index_U < BECKMANN_TABLE_SIZE; ++index_U) { - const float U = 0.0000001f + 0.9999998f * index_U / (float)(BECKMANN_TABLE_SIZE - 1); + const double U = 0.0000001 + 0.9999998 * index_U / (double)(BECKMANN_TABLE_SIZE - 1); /* inverse CDF_P22_omega_i, solve Eq.(11) */ while(CDF_P22_omega_i[index_slope_x] <= U) |