Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/effect.c
| Show First 20 Lines • Show All 541 Lines • ▼ Show 20 Lines | static float eff_calc_visibility(ListBase *colliders, | ||||
| if (!colliders) { | if (!colliders) { | ||||
| BKE_collider_cache_free(&colls); | BKE_collider_cache_free(&colls); | ||||
| } | } | ||||
| return visibility; | return visibility; | ||||
| } | } | ||||
| // noise function for wind e.g. | /* Noise function for wind e.g. */ | ||||
| static float wind_func(struct RNG *rng, float strength) | static float wind_func(struct RNG *rng, float strength) | ||||
| { | { | ||||
| int random = (BLI_rng_get_int(rng) + 1) % 128; /* max 2357 */ | int random = (BLI_rng_get_int(rng) + 1) % 128; /* max 2357 */ | ||||
| float force = BLI_rng_get_float(rng) + 1.0f; | float force = BLI_rng_get_float(rng) + 1.0f; | ||||
| float ret; | float ret; | ||||
| float sign = 0; | float sign = 0; | ||||
| /* Dividing by 2 is not giving equal sign distribution. */ | /* Dividing by 2 is not giving equal sign distribution. */ | ||||
| ▲ Show 20 Lines • Show All 857 Lines • Show Last 20 Lines | |||||