diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-03-12 17:42:03 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-03-12 17:42:03 +0300 |
commit | 8252fa5a16b9e09662ad3d2a20f78bc4e324afa6 (patch) | |
tree | 327780b77b613450c2a5efb58ac0a973c78c4be4 | |
parent | 812be2053a95bc3dec63f24fd7a27640693516e1 (diff) |
Fix smoke looking black in the viewport when compiling with -ffast-math.
(memset works on byte level and bytes -1,-1,-1,-1 = NaN).
-rw-r--r-- | source/blender/blenkernel/intern/smoke.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 2196e2ccd04..69209699a69 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -1398,11 +1398,12 @@ static void get_cell(float *p0, int res[3], float dx, float *pos, int *cell, int static void smoke_calc_transparency(float *result, float *input, float *p0, float *p1, int res[3], float dx, float *light, bresenham_callback cb, float correct) { - int z; float bv[6]; - int slabsize=res[0]*res[1]; + int a, z, slabsize=res[0]*res[1], size= res[0]*res[1]*res[2]; + + for(a=0; a<size; a++) + result[a]= -1.0f; - memset(result, -1, sizeof(float)*res[0]*res[1]*res[2]); // x bv[0] = p0[0]; bv[1] = p1[0]; // y |