mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 08:14:45 +00:00
Stages no longer share one RandomGenerator. StageContext.random() is the running stage's own stream: java.util.Random seeded with mix(mix(invocationSeed) ^ fnv1a64(utf8(stageId))), mix being the SplitMix64 finalizer. Adding, removing or reordering modules, or how much other stages draw, no longer changes a stage's draws. A block stage keeps one stream across the blocks of its pass. The host passes a long invocation seed to PlacementRunner.place and ChunkRunner.generate instead of a RandomGenerator on the inputs; InvocationContext loses random(), so stages cannot reach a shared stream. ObjectGenerationContext keeps its own random() for geometry generators. StageRandom documents the derivation, and a test pins it to values computed from the specification.