2026-07-12 19:49:33 +01:00
|
|
|
# Third-Party Notices
|
|
|
|
|
|
2026-09-14 13:30:00 +02:00
|
|
|
## 2D and 3D Simplex Noise
|
2026-07-17 07:45:28 +01:00
|
|
|
|
2026-09-14 13:30:00 +02:00
|
|
|
`math.snoise` and `cultmath_snoise` port the textureless 2D and 3D
|
|
|
|
|
simplex-noise functions by Ian McEwan and Ashima Arts, as distributed by Stefan
|
2026-07-17 07:45:28 +01:00
|
|
|
Gustavson's `webgl-noise` project and Unity Mathematics.
|
|
|
|
|
|
CultMath: snoise(float3) takes the upstream simplex-boundary fix
Kernel radius^2 0.6 -> 0.5, scale 42 -> 105, permute (34x+1)x -> (34x+10)x, per
stegu/webgl-noise 22434e04d7 (fix 21d9fe23d7, scale ff3b5d34ea, permute a3e6d57095).
snoise_grad, fbm_grad, ridged_grad follow. C#, both HLSL copies, design.md and
THIRD-PARTY-NOTICES.md change together. The 2D snoise shares the permute helper, so
its values change too. Golden values are regenerated in the next commit.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 11:13:34 +02:00
|
|
|
`math.snoise(float3)` and `cultmath_snoise(float3)` follow `src/noise3D.glsl` and
|
|
|
|
|
`math.snoise(float2)` follows `src/noise2D.glsl` of stegu/webgl-noise at commit
|
|
|
|
|
`22434e04d7753f7e949e8d724ab3da2864c17a0f` (the simplex-boundary fix is
|
2026-10-04 03:26:10 +02:00
|
|
|
`21d9fe23d7`, scale `ff3b5d34ea`, permutation `a3e6d57095`). Modified from upstream:
|
|
|
|
|
the 3D corner tie order follows Gustavson's `simplexnoise1234`, because the
|
|
|
|
|
upstream `step` compares are cyclic where the offset's components are equal.
|
CultMath: snoise(float3) takes the upstream simplex-boundary fix
Kernel radius^2 0.6 -> 0.5, scale 42 -> 105, permute (34x+1)x -> (34x+10)x, per
stegu/webgl-noise 22434e04d7 (fix 21d9fe23d7, scale ff3b5d34ea, permute a3e6d57095).
snoise_grad, fbm_grad, ridged_grad follow. C#, both HLSL copies, design.md and
THIRD-PARTY-NOTICES.md change together. The 2D snoise shares the permute helper, so
its values change too. Golden values are regenerated in the next commit.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 11:13:34 +02:00
|
|
|
|
2026-09-26 02:36:59 +02:00
|
|
|
`math.snoise_grad`/`cultmath_snoise_grad` (and the `fbm_grad`/`ridged_grad`
|
|
|
|
|
octave sums built on them) follow the analytic-gradient differentiation from
|
CultMath: snoise(float3) takes the upstream simplex-boundary fix
Kernel radius^2 0.6 -> 0.5, scale 42 -> 105, permute (34x+1)x -> (34x+10)x, per
stegu/webgl-noise 22434e04d7 (fix 21d9fe23d7, scale ff3b5d34ea, permute a3e6d57095).
snoise_grad, fbm_grad, ridged_grad follow. C#, both HLSL copies, design.md and
THIRD-PARTY-NOTICES.md change together. The 2D snoise shares the permute helper, so
its values change too. Golden values are regenerated in the next commit.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 11:13:34 +02:00
|
|
|
the same project's `src/noise3Dgrad.glsl`, with the same kernel radius,
|
|
|
|
|
permutation and scale as `snoise(float3)`.
|
2026-09-26 02:36:59 +02:00
|
|
|
|
2026-07-17 07:45:28 +01:00
|
|
|
- Copyright 2011 Ashima Arts.
|
|
|
|
|
- Upstream: <https://github.com/ashima/webgl-noise>
|
|
|
|
|
- License: MIT.
|
2026-09-29 23:51:04 +02:00
|
|
|
|
CultMath: Cycles node semantics (Math, Map Range, Clamp, Mix, RGB to BW, ramp index) as math.Cycles.cs and CultMath.Cycles.hlsl under Apache-2.0
Ports of Blender v5.2.2's intern/cycles kernel functions, one function per node
operation, with the HLSL mirror, the Unity copy, the lowering table entry for a
separate Apache-2.0 GLSL file, the golden-fixture families, the package licence
expressions and the notices section.
Builds. Does not pass yet: CultMath.Cycles.glsl and the regenerated golden
fixture arrive in a later commit, so CommittedGlslEqualsLowering and
GoldenFixtureMatchesCSharp fail at this commit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 03:59:59 +02:00
|
|
|
## Cycles node semantics
|
|
|
|
|
|
|
|
|
|
`math.cycles_*` and `cultmath_cycles_*` port what Blender's Cycles renderer
|
|
|
|
|
computes for the Math, Map Range, Clamp, Mix and RGB to BW nodes and for a Color
|
|
|
|
|
Ramp lookup. Each function's comment names the Cycles file it follows, all from
|
|
|
|
|
`intern/cycles` at the Blender `v5.2.2` tag: `kernel/svm/math_util.h`,
|
|
|
|
|
`kernel/svm/map_range.h`, `kernel/svm/clamp.h`, `kernel/svm/mix.h`,
|
|
|
|
|
`kernel/svm/color_util.h`, `kernel/svm/ramp.h`, `kernel/svm/convert.h`,
|
|
|
|
|
`util/math_base.h`, `util/math_float3.h` and `util/color.h`. The code was
|
|
|
|
|
changed: Cycles C++ became C# and HLSL, one function per node operation, with
|
|
|
|
|
the nodes' socket defaults and clamp options left to the caller, and the modulo
|
|
|
|
|
is the quotient form every CultMath target shares rather than `fmodf`. Nothing
|
|
|
|
|
was read from Blender's GPL sources (`source/blender/gpu`, `source/blender/blenlib`).
|
|
|
|
|
|
|
|
|
|
- Copyright 2011-2022 Blender Foundation.
|
|
|
|
|
- Upstream: <https://projects.blender.org/blender/blender> (`intern/cycles`).
|
|
|
|
|
- License: Apache-2.0 (<https://www.apache.org/licenses/LICENSE-2.0>), which is
|
|
|
|
|
per-file here: it covers `src/CultMath/math.Cycles.cs`,
|
|
|
|
|
`shaders/CultMath.Cycles.hlsl` and the Unity copy of that include, and
|
|
|
|
|
`shaders/CultMath.Cycles.glsl`, which is generated from that include. Each
|
|
|
|
|
carries the Apache-2.0 header and this attribution. The rest of CultMath, the
|
|
|
|
|
generated GLSL library included, is MIT or MPL-2.0 as above, so the
|
|
|
|
|
`GameCult.Math` NuGet package and the `org.gamecult.cultmath` Unity package
|
|
|
|
|
both declare `MIT AND MPL-2.0 AND Apache-2.0` and ship this file.
|
|
|
|
|
- The test fixtures under `tests/CultMath.Tests/fixtures/cycles-oracle` are
|
|
|
|
|
results of running Blender 5.2.2 through `tools/cycles-oracle/oracle.py`
|
|
|
|
|
(GPL-3.0-or-later, a Blender Python script, shipped neither in the NuGet
|
|
|
|
|
package nor in the Unity package).
|
|
|
|
|
|
2026-09-29 23:51:04 +02:00
|
|
|
## Phacelle Noise
|
|
|
|
|
|
|
|
|
|
`math.phacelle` and `cultmath_phacelle` follow Rune Skovbo Johansen's Phacelle
|
|
|
|
|
noise (Shadertoy `t3dyWl`; erosion filter `wXcfWn`; blog, March 2026), read
|
|
|
|
|
from the C# port `PhacelleNoise` in `lpmitchell/AdvancedTerrainErosion`
|
|
|
|
|
(`AdvancedTerrainErosion.cs`, converted to burstable C# by Luke Mitchell,
|
|
|
|
|
2026). The cell weight, the phase blend and the normalization follow it. The
|
|
|
|
|
3D-cell generalisation, the caller-supplied stripe wave vector, the exact
|
|
|
|
|
gradient and the exact pruning are new here.
|
|
|
|
|
|
|
|
|
|
- Copyright (c) 2025 Rune Skovbo Johansen.
|
|
|
|
|
- Upstream: <https://github.com/lpmitchell/AdvancedTerrainErosion>
|
CultMath: Phacelle port moves into MPL-2.0 files; prune cut pinned by boundary points
MPL-2.0 is file-level and the Phacelle port sat inside MIT files. phacelle and
CultPhasor now live in math.Phacelle.cs and CultPhasor.cs, and cultmath_phacelle
in CultMath.Phacelle.hlsl (included by CultMath.hlsl, both tracked copies), each
with the MPL header and Johansen / Luke Mitchell attribution. math stays one
partial class, so math.phacelle is called exactly as before. The GameCult.Math
package declares MIT AND MPL-2.0 and packs THIRD-PARTY-NOTICES.md and the new
include; the Unity LICENSE.md points at CultLib; build-unity-package.ps1
requires the new include.
The random sweeps never met a cell whose box bound sits just under the 2.25 cut
while its weight is still nonzero, so cuts of 2.245, 2.24 and 2.2 survived.
Six hard-coded points (found by an offline search) sit next to such cells; the
C# pruned-vs-unpruned test and the HLSL mirror test both use them, with a
witness check that re-derives the property from the hash.
Docs: the prune keeps about 45 of 64 cells (14 is the nonzero-weight count),
the support radius is 1.49998 (d^2 = 2.24995), normalization's range and
saturation, W = 0 only for adversarial hashes, and the support-edge gradient
seam size.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-30 00:34:27 +02:00
|
|
|
- License: MPL-2.0 (<https://mozilla.org/MPL/2.0/>). MPL-2.0 is file-level, so it
|
|
|
|
|
covers exactly the files that carry the port and nothing else:
|
|
|
|
|
`src/CultMath/math.Phacelle.cs`, `src/CultMath/CultPhasor.cs`,
|
2026-10-02 20:09:45 +02:00
|
|
|
`shaders/CultMath.Phacelle.hlsl` and the Unity copy of that include, and
|
CultMath GLSL: Phacelle lowered into its own MPL-2.0 file; iv_frustum_ball and iv_exp in the fixture
GlslLowering.SeparateFiles is the one name-keyed rule: CultMath.Phacelle.hlsl
lowers into shaders/CultMath.Phacelle.glsl (MPL-2.0, guard
CULTMATH_PHACELLE_GLSL) and its include line leaves CultMath.glsl, which is
now MIT and says so in its provenance line. ReadShaderSource takes an
include predicate (one resolver); the C# mirror still inlines everything.
GlslMirrorTests pins both files, checks tokens in each, takes the union of
definitions and asserts cultmath_phacelle( and CultPhasor live only in the
Phacelle file. The fixture appends cultmath_iv_frustum_ball (exact) and
cultmath_iv_exp ("ulp-bounded, platform exp", platform named); the
comparison is per family, the platform family within 1 ulp with the
maximum printed. THIRD-PARTY-NOTICES lists CultMath.Phacelle.glsl, not
CultMath.glsl, as MPL-2.0.
Regenerated on Yggdrasil (Ubuntu 24.04.5, .NET 10.0.12); 286/286 green,
iv_exp within 0 ulp.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 13:40:16 +02:00
|
|
|
`shaders/CultMath.Phacelle.glsl`, which is generated from that include. Each
|
|
|
|
|
carries the MPL-2.0 header and this attribution. The rest of CultMath, the
|
|
|
|
|
generated GLSL library included, is MIT, so the `GameCult.Math` NuGet
|
|
|
|
|
package and the `org.gamecult.cultmath` Unity package both declare
|
|
|
|
|
`MIT AND MPL-2.0` and ship this file.
|