CultMath: regenerate snoise golden values for the upstream kernel
Seven values change: four snoise(float3) in HlslSemanticsTests and three snoise(float2) in MathTests (the 2D (0,0) golden is 0 either way). Regenerated from the code after the continuity probe passed. The tests no longer claim to match Unity.Mathematics, whose snoise keeps the old constants. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
641041822d
commit
0a5f4bf571
2 changed files with 9 additions and 9 deletions
|
|
@ -444,11 +444,11 @@ public sealed class HlslSemanticsTests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(0.0f, 0.0f, 0.0f, -0.41219875f)]
|
||||
[InlineData(0.25f, -0.5f, 1.75f, 0.5250269f)]
|
||||
[InlineData(12.25f, -4.5f, 3.125f, 0.008141451f)]
|
||||
[InlineData(-7.3f, 2.9f, 101.4f, 0.578015f)]
|
||||
public void Snoise3MatchesUnityMathematicsReference(float x, float y, float z, float expected)
|
||||
[InlineData(0.0f, 0.0f, 0.0f, -0.435872972f)]
|
||||
[InlineData(0.25f, -0.5f, 1.75f, 0.0492948629f)]
|
||||
[InlineData(12.25f, -4.5f, 3.125f, 0.443114728f)]
|
||||
[InlineData(-7.3f, 2.9f, 101.4f, -0.10221792f)]
|
||||
public void Snoise3MatchesGoldenValues(float x, float y, float z, float expected)
|
||||
{
|
||||
Assert.Equal(expected, math.snoise(new float3(x, y, z)), precision: 5);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -307,10 +307,10 @@ public sealed class MathTests
|
|||
|
||||
[Theory]
|
||||
[InlineData(0.0f, 0.0f, 0.0f)]
|
||||
[InlineData(0.25f, -0.5f, -0.425866783f)]
|
||||
[InlineData(12.25f, -4.5f, 0.258312f)]
|
||||
[InlineData(536.5106f, 536.5106f, -0.6901103f)]
|
||||
public void SimplexNoiseMatchesUnityMathematics(float x, float y, float expected)
|
||||
[InlineData(0.25f, -0.5f, 0.225074813f)]
|
||||
[InlineData(12.25f, -4.5f, -0.388599217f)]
|
||||
[InlineData(536.5106f, 536.5106f, 0.538390875f)]
|
||||
public void SimplexNoiseMatchesGoldenValues(float x, float y, float expected)
|
||||
{
|
||||
Assert.Equal(expected, math.snoise(new float2(x, y)), precision: 6);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue