Sand::SpawnGrain
function · lighting · primitive
- Address
0x6793f0· 1147 bytes, up to0x67986a- Meaning
- Seeds one sand grain near the box's far end with a velocity turned by the heading
- Confidence
- inferred
- Finding
- lighting/precipitation#sand
- Test
lighting::sand_angle_difftest,lighting::sand_cam_global_difftest,lighting::sand_cell_delta_difftest,lighting::sand_lifetime_difftest,lighting::sand_negate_difftest,lighting::sand_pos_seed_difftest,lighting::sand_sincos_difftest,lighting::sand_speed_difftest,lighting::sand_vel_offset_difftest,lighting::sand_vel_scale_difftest,lighting::sand_vel_xy_difftest,lighting::sand_vel_z_difftest,lighting::sand_world_scale_difftest
Finding: Sand in lighting: precipitation
Sand emits K·P·x grains a second, P = 32000 with shaders and 6000 without, and its mist K·Q·x
puffs, Q = 64 or 32, with no threshold. A grain starts at 0.85 to 1.0 of the box's length and
anywhere across and up it, with a = (u − 0.5)·0.349 − 1.57, a speed of (u − 0.5)·2/3 + 18.667
and a third term (u − 0.5)/6 + 0.833, all turned by the heading about the vertical. It draws as
points through sand.bls.
The derivation is in the doc.
Callers 1
- Sand::EmitGrains lighting
Callees 7
- _atexit crt
- NTempest::CRandom::uint32 random
- SetVector3 spline
- Vector3LengthSquared spline
- GetWeatherGrid lighting
- TransformPoint34Rows cmath
- RotateMatrix cmath
Calls and jumps by a bare address, from tables/calls.tsv.