forked from bartvdbraak/blender
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.
This commit is contained in:
parent
19f89a083f
commit
5e216a6aa9
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user