Skip to content

Apply domain warp seed offset exactly once - #190

Merged
Auburn merged 1 commit into
masterfrom
fix/warp-seed-offset
Oct 9, 2026
Merged

Auburn merged 1 commit into
masterfrom
fix/warp-seed-offset

Conversation

@Auburn

@Auburn Auburn commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Problem

The domain warp seed offset was applied inconsistently. DomainWarp::GenT added mSeedOffset, then the Gradient and Simplex Warp() overloads added it again. The SuperSimplex Warp() overloads never added it. DomainWarpFractal* calls Warp() directly, bypassing GenT.

Warp node Used directly Inside DomainWarpFractal
Gradient / Simplex seed + 2× offset seed + offset
SuperSimplex seed + offset seed (offset ignored)

Fix

Remove the add from GenT, and add it to the SuperSimplex Warp() overloads. The offset is now applied exactly once, inside Warp(), for every warp type and whichever way it's used.

Output change

Only affects warps with a non-zero Seed Offset:

  • Gradient and Simplex warps used directly.
  • SuperSimplex warps inside a fractal warp.

Testing

  • A warp with offset k at seed s must equal the same warp with offset 0 at seed s + k. I checked this for Gradient, Simplex and SuperSimplex, both directly and inside DomainWarpFractalProgressive, in 2D, 3D and 4D, on SSE2, SSE4.1, AVX2 and AVX512.
    • Before: Gradient/Simplex failed when used directly, and SuperSimplex failed inside the fractal.
    • After: all pass.
  • No output changes for the default offset of 0.

DomainWarp::GenT added the seed offset and then the Gradient/Simplex Warp() overloads added it again, while the SuperSimplex Warp() overloads never added it, so it was ignored when used through DomainWarpFractal. Apply the offset only inside Warp() for all warp types.
@Auburn
Auburn merged commit 18e5544 into master Oct 9, 2026
8 of 9 checks passed
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