[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13846] trunk/blender/source/blender/ blenkernel/intern/particle_system.c:
Brecht Van Lommel
brechtvanlommel at pandora.be
Sun Feb 24 15:53:44 CET 2008
Revision: 13846
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13846
Author: blendix
Date: 2008-02-24 15:53:44 +0100 (Sun, 24 Feb 2008)
Log Message:
-----------
Fix for bug #8304: child distribution gave different results across
platforms. Cause was a function(rng_getFloat(), rng_getFloat()),
apparently the order in which rng_getFloat() is evaluated is not
compatible between operating systems.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/particle_system.c
Modified: trunk/blender/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/particle_system.c 2008-02-24 13:49:31 UTC (rev 13845)
+++ trunk/blender/source/blender/blenkernel/intern/particle_system.c 2008-02-24 14:53:44 UTC (rev 13846)
@@ -505,7 +505,7 @@
ParticleData *tpa;
ParticleSettings *part= ctx->psys->part;
float *v1, *v2, *v3, *v4, nor[3], orco1[3], co1[3], co2[3], nor1[3], ornor1[3];
- float cur_d, min_d;
+ float cur_d, min_d, randu, randv;
int from= ctx->from;
int cfrom= ctx->cfrom;
int distr= ctx->distr;
@@ -547,7 +547,9 @@
//ctx->jitoff[i]=(float)fmod(ctx->jitoff[i]+ctx->maxweight/ctx->weight[i],(float)ctx->jitlevel);
break;
case PART_DISTR_RAND:
- psys_uv_to_w(rng_getFloat(thread->rng), rng_getFloat(thread->rng), mface->v4, pa->fuv);
+ randu= rng_getFloat(thread->rng);
+ randv= rng_getFloat(thread->rng);
+ psys_uv_to_w(randu, randv, mface->v4, pa->fuv);
break;
}
pa->foffset= 0.0f;
@@ -645,7 +647,9 @@
// ctx->jitoff[i]=(float)fmod(ctx->jitoff[i]+ctx->maxweight/ctx->weight[i],(float)ctx->jitlevel);
// break;
// case PART_DISTR_RAND:
- psys_uv_to_w(rng_getFloat(thread->rng), rng_getFloat(thread->rng), mf->v4, cpa->fuv);
+ randu= rng_getFloat(thread->rng);
+ randv= rng_getFloat(thread->rng);
+ psys_uv_to_w(randu, randv, mf->v4, cpa->fuv);
// break;
//}
More information about the Bf-blender-cvs
mailing list