Skip to content

Stop fractured noise from mirroring across x = z - #1264

Draft
piexelated wants to merge 1 commit into
masterfrom
fix/fracture-mirror
Draft

piexelated wants to merge 1 commit into
masterfrom
fix/fracture-mirror

Conversation

@piexelated

Copy link
Copy Markdown
Contributor

Needs VolmitSoftware/VolmLib#3 merged first. It adds CNG.reseededForAxis and CNG.fractureAxisSeed, and this PR does not compile against VolmLib master.

Composite fractures read the z warp at swapped coordinates (z, x), so every fractured generator was a mirror image of itself across x = z. This is the Iris half of the VolmLib fix:

  • IrisNoiseGenerator and the batched NoiseLayerProgram read each fracture axis from the generator reseeded for that axis, at the same coordinates. A reseeded generator shares its nested fracture, so both axes of a level read the same warped coordinates. The deep-chain path and the batch program cost the same number of samples as before.
  • The datapack exporter reads its z warps at unswapped coordinates. They were already separate noises, salted by path.

Fractured terrain changes for existing worlds. This is a plain fix with no compatibility flag.

Tests, run against the VolmLib #3 branch: IrisNoiseGeneratorFractureMirrorTest (new), IrisNoiseGeneratorFractureTest, NoiseSeedCohesionTest, NoiseStyleContractTest, IrisMathNoiseHotPathParityTest, IrisCaveCarver3DCellKernelTest, SmoothNoiseFidelityTest. 45 tests, 0 failures, 1 skipped. Deep chains still match the recursive reference bit for bit. NoiseStyleContractTest and SmoothNoiseFidelityTest pass unchanged.

Retaken on Linux: the Linux/Windows digest in NoiseSeedCohesionTest, the IrisCaveCarver3DCellKernelTest PACK_SHARED hash and write count, and three IrisMathNoiseHotPathParityTest values. PINNED_HASH_MAC is not retaken and will fail on macOS until someone reruns it there.

Not rerun after switching to the per-axis API: the wider exporter suite (pack.datapack.export.*) and the pack suites.

- Read each composite fracture axis from its own reseeded generator at unswapped coordinates in IrisNoiseGenerator and the batched NoiseLayerProgram
- Read the datapack exporter's z warps at unswapped coordinates
- Add a mirror test for the composite fracture and move the fracture test reference to per-axis seeds
- Retake NoiseSeedCohesionTest (Linux/Windows digest), IrisCaveCarver3DCellKernelTest PACK_SHARED and three IrisMathNoiseHotPathParityTest values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant