fastnoise2
When to use this skill
- Inspect, integrate or troubleshoot the named Auburn/FastNoise2 library, its C API or pinned FastSIMD dependency.
- Build and evaluate FastNoise2 node trees, load encoded configurations or diagnose SIMD/determinism/threading behavior.
- Plan the optional FastNoise2 Node Editor build, serialization workflow or shared-memory IPC integration.
- Route FastNoise Lite, standalone GLSL noise, generic terrain meshing and unrelated noise libraries elsewhere. An external C#/Rust/Unreal binding has its own repository/version/license contract; listing it in upstream README does not prove it matches the selected core ABI.
Instructions
1. Choose one mode and establish the source boundary
Select one primary mode: inspect-source, core-integration, node-graph, determinism-or-threading, c-api-or-binding, or node-editor. Record the project's existing FastNoise2 revision, compiler, target CPU/SIMD, build type, requested side effects and measurable acceptance criteria. Preserve existing locks and versions until an explicit upgrade decision.
Read this installed skill's references/source.json for selected-file hashes and references/upstream.md for primary links, dependency pins, license conditions and documented drift. Resolve both references and scripts/preflight.py relative to the directory containing this SKILL.md, not an assumed repository root.
Helper host prerequisite: Before running the helper, use a POSIX Python environment with os.O_NOFOLLOW and os.open support for dir_fd. Native Windows may fail closed with secure_posix_traversal_unavailable; preserve these safety guards. Windows users can retry in a WSL environment that supports these features or manually compare the original manifest-listed source files against the pinned evidence. Neither this guidance nor a manual comparison verifies helper execution or runtime behavior; report those as unverified.
If offline helper execution is authorized, from the installed skill directory use:
python3 -B scripts/preflight.py --json
python3 -B scripts/preflight.py --json --repo /absolute/nonsymlink/upstream-checkout
The helper never fetches dependencies or executes upstream code. Without --repo it checks no source files. A selected-file match does not attest Git HEAD or unlisted files; whole_revision_verified=false, runtime_verified=false and tool_versions_verified=false remain limitations. Tool presence is informational, not a compiler-version or runtime test. Report a mismatched pin before proceeding.
2. Freeze version, dependencies and license
The audited master commit is 721400f9560831be2fc9790be9b72c44bee7d33f; CMake still declares 1.1.1, but this is not release v1.1.1 (903c1f2d2f9d53ddce94cd223f32727d9ab3aeaa). The master commit fixes C API reference lifetime/null/failed-create bugs after that release. Never use the version string alone to infer the fix is present.
Core uses C++17/CMake 3.10+ and CPU SIMD, not a GPU compute backend. Current Node Editor adds C++20 and substantial dependencies. Core's CPM fetch pins FastSIMD at f7e9ce6fca475731c0a3c115ec29dcfd36886b2a; even a CMake configure can download code. Preview network/cache/output scope and obtain approval before acquisition, configuration, compilation or editor launch.
Read the complete pinned MIT license, retain copyright/permission/disclaimer when distributing substantial portions, and inspect FastSIMD/CPM notices. Node Editor adds MIT/zlib-style dependencies, FreeType FTL-or-GPL and an embedded font whose item-level license was not established in this audit. Route redistribution through that unresolved boundary rather than calling the whole editor MIT-only.
3. Execute only the selected workflow
core-integration
- Inspect target toolchain/ABI, compiler, static/shared choice and existing package. Configure a disposable, approved output directory, not the source tree. Disable tools explicitly for a core-only standalone build:
FASTNOISE2_TOOLS=OFF. - Integrate source using
add_subdirectoryandtarget_link_libraries(... FastNoise); use#include <FastNoise/FastNoise.h>. CMake supplies include/linked dependencies and the static define. Manual static consumers must defineFASTNOISE_STATIC_LIB. - For installed packages inspect the exported config/targets. Current source installs package FastNoise2 and namespace
FastNoise2::; the old wiki'sfind_package(FastNoise ...)andFASTNOISE2_NOISETOOLexamples are stale. The source-derivedFastNoise2::FastNoiserecipe needs testing against the actual installed artifacts. - On Windows discuss upstream's MSVC SIMD correctness warning and ClangCL recommendation. Changing the compiler or claiming locally tested ABI compatibility requires prior explicit approval and evidence.
- After authorized build, verify one batch fixture, allocation capacity and static/shared deployment. Compiler success, generated-noise correctness and speed are separate checks.
node-graph
- Read selected-pin headers and the architecture guide. Construct nodes with
FastNoise::New<T>(); required generator inputs such asSetSourcemust be connected before generation. Missing required sources can null-dereference. - Distinguish generator-source connections, optional hybrid constant/generator inputs and scalar variables. Example: Simplex source into FractalFBm using
SetSource, thenSetOctaveCount. Keep nodes in a compatible SIMD feature set. - Use
SetScalefor feature scale; generation step controls sampling resolution, not feature scale. Do not transplant old frequency-signature examples across versions. - Allocate the complete output grid, check dimensions/overflow and inspect the exact
GenUniformGrid2D/3D/4D,GenPositionArray*orGenTileable2Dsignature at the pin. Generate from the outermost root, not an inner source. Prefer batches; do not putGenSinglein dense loops. - For encoded trees call
FastNoise::NewFromEncodedNodeTreeand test the returned node before generating. Treat externally supplied strings as data, bound input/output sizes and reject failed loads. Do not claim cross-version encoded-tree compatibility without evidence. - Compare known-seed fixtures for expected dimensions, finite output and algorithm-specific range assumptions; do not assert every node stays in [-1,1]. Tiling checks compare the correct wrapped sampling contract, not arbitrary adjacent values.
determinism-or-threading
- Define exact byte equality versus numerical tolerance, target architectures and supported feature sets before selecting flags. Runtime SIMD dispatch can produce small floating differences by default.
- Consider
FASTNOISE2_STRICT_FP=ONand a consistent supported feature-set ceiling on node creation.FastSIMD::FeatureSet::SSE2is an x86 example, not a portable instruction set for ARM/WASM. Never force instructions unavailable on the target. - Sharing a tree for concurrent const generation is supported. Freeze node parameters first; do not call setters while another thread generates. Give workers separate output buffers and preserve node lifetime until all finish.
- Test identical fixtures across the actual feature sets, builds and machines in scope. Report max error or byte equality and seed/tree revision; a flag or source claim alone does not verify cross-machine reproducibility.
- Profile batches on the actual hardware; for 3D/4D 2D slices avoid xCount=1 where possible. Upstream benchmark figures are not a measured local speedup.
c-api-or-binding
- Inspect
FastNoise_C.h, the binding's ownership contract and the precise core commit. Distinguish opaque C handles from C++ SmartNode lifetime management. - Check creation failure before every dependent call; release each owned handle once after workers finish. Prefer the inspected post-release fixed commit when explicitly approved, rather than assuming all packages labeled 1.1.1 include its fixes.
- Design bounded create/generate/delete and failed-create/null tests. Execute leak/sanitizer tests only after an approved build plan; do not mark them passing based on the commit message.
- Inspect binding API/ABI compatibility independently and report a missing test/artifact as a blocker, not generic FastNoise2 failure.
node-editor
- Separate core library readiness from editor readiness. Preview C++20, OpenGL/GLFW desktop requirements, optional shared-memory IPC and all configure downloads. WASM editor uses Emscripten SIMD/pthreads and is a distinct deployment target.
- Obtain approval before downloads/builds, editor launch, IPC connection or writing exported configurations. For desktop IPC name the target application and data exchanged; do not connect to arbitrary running applications.
- Design the tree, select its root, then use Copy Encoded Node Tree. Load the exact string with a compatible core version and check null before generation. Record editor/core revisions and compare an equivalent fixed-seed grid.
- Treat desktop preview mesh/heightmaps as tools, not an automatic production terrain pipeline. Before redistributing editor binaries resolve the font and dependency-license closure in the upstream reference.
4. Verify and report the actual boundary
Return the selected mode, commit/release, compiler/build flags, dependency acquisition performed or skipped, fixture dimensions/seed/tree, checks actually run with exit status and remaining limits. A workflow matrix proves configured coverage, not successful runtime tests. Keep installations, configure downloads, builds, cross-app IPC and publishing behind separate scoped approvals.
Examples
- Core-only build plan, not executed: pinned master
721400f9560831be2fc9790be9b72c44bee7d33f, project version 1.1.1, official Compiling FastNoise2 wiki and root CMake:cmake -S . -B build -DFASTNOISE2_TOOLS=OFFthencmake --build build --config Release. Warn that configure can acquire FastSIMD through CPM before requesting approval; do not describe this as offline. - Node graph design: against the same pinned source, create
FastNoise::Simplex, connect it throughFastNoise::FractalFBm::SetSource, set five octaves and batch-generate from the fractal. Source: Node Graph Architecture wiki plus selected-pin headers. Inspect the current grid signature before implementing; the wiki Home sample references an undeclared noiseOutput variable and must not be copied unchanged. - Exact-output request: “FastNoise2 differs between AVX2 and SSE2.” Read the FAQ, define the equality target, propose strict FP and a supported consistent feature set, then test the real fixtures when approved. No local cross-machine equivalence was established by this skill.
- Near miss: “Use FastNoise Lite's single-header API” routes to FastNoise Lite, not this repository or FastNoise2 CMake options.
Best practices
- Separate core C++17, optional C++20 editor, C API and external bindings; preserve each version contract.
- Prefer bounded batch generation, explicit source connections, successful decoded-tree checks and immutable shared trees.
- Keep hardware-specific instruction sets conditional and distinguish feature-set selection from verified deterministic output.
- The CMake version can remain unchanged across bug fixes; bind claims to the exact commit.
- Keep original encoded strings and fixtures before editing and never claim general serialization compatibility from one successful example.
- Evaluation scenarios in
evals/evals.jsonare authored-not-executed, not benchmark or safety-test results.