Add portable radial cosine field source

This commit is contained in:
Meta Vens 2026-07-15 23:37:10 +01:00
commit c5a4a75c1b
5 changed files with 11 additions and 2 deletions

View file

@ -6,7 +6,7 @@
<Description>Runtime-neutral C# contracts for gamecult.fields documents.</Description> <Description>Runtime-neutral C# contracts for gamecult.fields documents.</Description>
<CultLibRoot Condition="'$(CultLibRoot)' == ''">$(MSBuildThisFileDirectory)..\..\..\CultLib</CultLibRoot> <CultLibRoot Condition="'$(CultLibRoot)' == ''">$(MSBuildThisFileDirectory)..\..\..\CultLib</CultLibRoot>
<PackageId>GameCult.Eve.PluginFields</PackageId> <PackageId>GameCult.Eve.PluginFields</PackageId>
<Version>0.2.2</Version> <Version>0.2.3</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -50,6 +50,7 @@ test("publishes a runtime-neutral Unity contract package", () => {
assert.match(contracts, /interface IEveFieldsSplatsDocument/); assert.match(contracts, /interface IEveFieldsSplatsDocument/);
assert.match(contracts, /gamecult\.fields\.splats\.v1/); assert.match(contracts, /gamecult\.fields\.splats\.v1/);
assert.match(contracts, /AnimatedCellNoiseB = 3/); assert.match(contracts, /AnimatedCellNoiseB = 3/);
assert.match(contracts, /AnimatedRadialCosine = 4/);
assert.match(contracts, /AbsoluteValue = 1/); assert.match(contracts, /AbsoluteValue = 1/);
assert.doesNotMatch(contracts, /UnityEngine|Aetheria|MessagePack|GameCult\.Caching/); assert.doesNotMatch(contracts, /UnityEngine|Aetheria|MessagePack|GameCult\.Caching/);
assert.match(readFileSync(new URL("../GameCult.Eve.PluginFields.csproj", import.meta.url), "utf8"), /netstandard2\.1/); assert.match(readFileSync(new URL("../GameCult.Eve.PluginFields.csproj", import.meta.url), "utf8"), /netstandard2\.1/);

View file

@ -19,3 +19,10 @@ distance metric is `(length(frac(p) - .5) * 1.5 + .25) *
max(abs(x) * .866 + y * .5, -y)`. `AbsoluteValue` folds a signed source after max(abs(x) * .866 + y * .5, -y)`. `AbsoluteValue` folds a signed source after
sampling. Constant offsets remain ordinary constant splats, so source sampling sampling. Constant offsets remain ordinary constant splats, so source sampling
and additive composition retain separate ownership. and additive composition retain separate ownership.
`AnimatedRadialCosine` is splat-local rather than field-world anchored. It
evaluates
`cos(pow(distance01, FrequencyY) * FrequencyX + PhaseX + simulationTimeSeconds * AnimationSpeed)`.
`FrequencyX` is radial frequency and `FrequencyY` is the positive radial
exponent. The ordinary splat falloff owns the envelope, which keeps oscillation
and compact support independently composable.

View file

@ -44,6 +44,7 @@ namespace GameCult.Eve.PluginFields
public const int SimplexNoise = 1; public const int SimplexNoise = 1;
public const int AnimatedSimplexNoise = 2; public const int AnimatedSimplexNoise = 2;
public const int AnimatedCellNoiseB = 3; public const int AnimatedCellNoiseB = 3;
public const int AnimatedRadialCosine = 4;
} }
public static class EveFieldsSplatSourceFlags public static class EveFieldsSplatSourceFlags

View file

@ -1,6 +1,6 @@
{ {
"name": "org.gamecult.eve.plugin-fields", "name": "org.gamecult.eve.plugin-fields",
"version": "0.2.2", "version": "0.2.3",
"displayName": "Eve Fields Plugin Contracts", "displayName": "Eve Fields Plugin Contracts",
"description": "Runtime-neutral C# contracts for gamecult.fields documents.", "description": "Runtime-neutral C# contracts for gamecult.fields documents.",
"unity": "2021.3", "unity": "2021.3",