Adjust field visibility, fix naming violations in non test projects
このコミットが含まれているのは:
1 親
f73915bf93
コミット
746f132182
34ファイル変更
+171
-171
検索条件に一致するファイルはありません
@@ -15,7 +15,7 @@ internal readonly partial struct ColorfulInfinity : IPixelShader<float4>
|
||||
/// <summary>
|
||||
/// The current time since the start of the application.
|
||||
/// </summary>
|
||||
public readonly float time;
|
||||
private readonly float time;
|
||||
|
||||
/// <summary>
|
||||
/// The total number of layers for the final animation.
|
||||
|
||||
@@ -14,12 +14,12 @@ internal readonly partial struct ContouredLayers : IPixelShader<float4>
|
||||
/// <summary>
|
||||
/// The current time Hlsl.Since the start of the application.
|
||||
/// </summary>
|
||||
public readonly float time;
|
||||
private readonly float time;
|
||||
|
||||
/// <summary>
|
||||
/// The background texture to sample.
|
||||
/// </summary>
|
||||
public readonly IReadOnlyNormalizedTexture2D<float4> texture;
|
||||
private readonly IReadOnlyNormalizedTexture2D<float4> texture;
|
||||
|
||||
// float3 to float hash.
|
||||
private static float Hash21(float2 p)
|
||||
|
||||
@@ -14,7 +14,7 @@ internal readonly partial struct ExtrudedTruchetPattern : IPixelShader<float4>
|
||||
/// <summary>
|
||||
/// The current time since the start of the application.
|
||||
/// </summary>
|
||||
public readonly float time;
|
||||
private readonly float time;
|
||||
|
||||
/// <summary>
|
||||
/// Curve shape - Round: 0, Semi-round: 1, Octagonal: 2, Superellipse: 3, Straight: 4.
|
||||
|
||||
@@ -15,13 +15,13 @@ internal readonly partial struct FourColorGradient : IPixelShader<float4>
|
||||
/// <summary>
|
||||
/// The current time since the start of the application.
|
||||
/// </summary>
|
||||
public readonly float time;
|
||||
private readonly float time;
|
||||
|
||||
// Colors to blend together
|
||||
private static readonly float3 colorOne = new(0.999f, 0.999f, 0.999f);
|
||||
private static readonly float3 colorTwo = new(0.999f, 0f, 0f);
|
||||
private static readonly float3 colorThree = new(0f, 0.999f, 0f);
|
||||
private static readonly float3 colorFour = new(0f, 0f, 0.999f);
|
||||
private static readonly float3 ColorOne = new(0.999f, 0.999f, 0.999f);
|
||||
private static readonly float3 ColorTwo = new(0.999f, 0f, 0f);
|
||||
private static readonly float3 ColorThree = new(0f, 0.999f, 0f);
|
||||
private static readonly float3 ColorFour = new(0f, 0f, 0.999f);
|
||||
|
||||
/// <summary>
|
||||
/// Standard 2D rotation formula.
|
||||
@@ -99,8 +99,8 @@ internal readonly partial struct FourColorGradient : IPixelShader<float4>
|
||||
tuv.Y += Hlsl.Sin(tuv.X * frequency * 1.5f + speed) / (amplitude * 0.5f);
|
||||
|
||||
// Draw the image
|
||||
float3 layer1 = Hlsl.Lerp(colorOne, colorTwo, Hlsl.SmoothStep(-0.3f, 0.2f, Hlsl.Mul(tuv.XY, Rotate(Hlsl.Radians(-5.0f))).X));
|
||||
float3 layer2 = Hlsl.Lerp(colorThree, colorFour, Hlsl.SmoothStep(-0.3f, 0.2f, Hlsl.Mul(tuv.XY, Rotate(Hlsl.Radians(-5.0f))).X));
|
||||
float3 layer1 = Hlsl.Lerp(ColorOne, ColorTwo, Hlsl.SmoothStep(-0.3f, 0.2f, Hlsl.Mul(tuv.XY, Rotate(Hlsl.Radians(-5.0f))).X));
|
||||
float3 layer2 = Hlsl.Lerp(ColorThree, ColorFour, Hlsl.SmoothStep(-0.3f, 0.2f, Hlsl.Mul(tuv.XY, Rotate(Hlsl.Radians(-5.0f))).X));
|
||||
float3 col = Hlsl.Lerp(layer1, layer2, Hlsl.SmoothStep(0.5f, -0.3f, tuv.Y));
|
||||
|
||||
return new(col, 1.0f);
|
||||
|
||||
@@ -15,7 +15,7 @@ internal readonly partial struct FractalTiling : IPixelShader<float4>
|
||||
/// <summary>
|
||||
/// The current time since the start of the application.
|
||||
/// </summary>
|
||||
public readonly float time;
|
||||
private readonly float time;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public float4 Execute()
|
||||
|
||||
@@ -13,7 +13,7 @@ internal readonly partial struct HelloWorld : IPixelShader<float4>
|
||||
/// <summary>
|
||||
/// The current time since the start of the application.
|
||||
/// </summary>
|
||||
public readonly float time;
|
||||
private readonly float time;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public float4 Execute()
|
||||
|
||||
@@ -14,7 +14,7 @@ internal readonly partial struct MengerJourney : IPixelShader<float4>
|
||||
/// <summary>
|
||||
/// The current time since the start of the application.
|
||||
/// </summary>
|
||||
public readonly float time;
|
||||
private readonly float time;
|
||||
|
||||
private const int MaxSteps = 30;
|
||||
private const float MinimumDistance = 0.0009f;
|
||||
@@ -100,7 +100,7 @@ internal readonly partial struct MengerJourney : IPixelShader<float4>
|
||||
/// <summary>
|
||||
/// Calculates the finite difference normal at a given position.
|
||||
/// </summary>
|
||||
private float3 getNormal(in float3 pos)
|
||||
private float3 GetNormal(in float3 pos)
|
||||
{
|
||||
float3 e = new(0.0f, NormalDistance, 0.0f);
|
||||
|
||||
@@ -141,7 +141,7 @@ internal readonly partial struct MengerJourney : IPixelShader<float4>
|
||||
|
||||
float smoothStep = steps + distance / MinimumDistance;
|
||||
float ao = 1.1f - smoothStep / MaxSteps;
|
||||
float3 normal = getNormal(pos - dir * NormalDistance * 3.0f);
|
||||
float3 normal = GetNormal(pos - dir * NormalDistance * 3.0f);
|
||||
float3 color = 1.0f;
|
||||
float3 light = GetLight(color, normal);
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ internal readonly partial struct Octagrams : IPixelShader<float4>
|
||||
/// <summary>
|
||||
/// The current time since the start of the application.
|
||||
/// </summary>
|
||||
public readonly float time;
|
||||
private readonly float time;
|
||||
|
||||
private static float2x2 Rotate(float a)
|
||||
{
|
||||
|
||||
@@ -15,9 +15,9 @@ internal readonly partial struct ProteanClouds : IPixelShader<float4>
|
||||
/// <summary>
|
||||
/// The current time Hlsl.Since the start of the application.
|
||||
/// </summary>
|
||||
public readonly float time;
|
||||
private readonly float time;
|
||||
|
||||
private static readonly float3x3 m3 = new float3x3(0.33338f, 0.56034f, -0.71817f, -0.87887f, 0.32651f, -0.15323f, 0.15162f, 0.69596f, 0.61339f) * 1.93f;
|
||||
private static readonly float3x3 M3 = new float3x3(0.33338f, 0.56034f, -0.71817f, -0.87887f, 0.32651f, -0.15323f, 0.15162f, 0.69596f, 0.61339f) * 1.93f;
|
||||
|
||||
private static float2x2 Rotate(in float a)
|
||||
{
|
||||
@@ -60,7 +60,7 @@ internal readonly partial struct ProteanClouds : IPixelShader<float4>
|
||||
z *= 0.57f;
|
||||
trk *= 1.4f;
|
||||
|
||||
p = Hlsl.Mul(p, m3);
|
||||
p = Hlsl.Mul(p, M3);
|
||||
}
|
||||
|
||||
d = Hlsl.Abs(d + prm1 * 3.0f) + prm1 * 0.3f - 2.5f + bsMo.Y;
|
||||
|
||||
@@ -15,7 +15,7 @@ internal readonly partial struct PyramidPattern : IPixelShader<float4>
|
||||
/// <summary>
|
||||
/// The current time Hlsl.Since the start of the application.
|
||||
/// </summary>
|
||||
public readonly float time;
|
||||
private readonly float time;
|
||||
|
||||
// Standard 2D rotation formula.
|
||||
private static float2x2 Rotate2x2(in float a)
|
||||
|
||||
@@ -14,7 +14,7 @@ internal readonly partial struct TriangleGridContouring : IPixelShader<float4>
|
||||
/// <summary>
|
||||
/// The current time Hlsl.Since the start of the application.
|
||||
/// </summary>
|
||||
public readonly float time;
|
||||
private readonly float time;
|
||||
|
||||
// Standard 2D rotation formula.
|
||||
private static float2x2 Rotate2x2(in float a)
|
||||
@@ -60,7 +60,6 @@ internal readonly partial struct TriangleGridContouring : IPixelShader<float4>
|
||||
return Hlsl.Lerp(Hlsl.Lerp(v.X, v.Y, p.X), Hlsl.Lerp(v.Z, v.W, p.X), p.Y);
|
||||
}
|
||||
|
||||
|
||||
// The isofunction. Just a Hlsl.Single noise function, but it can be more elaborate.
|
||||
private float IsoFunction(in float2 p)
|
||||
{
|
||||
@@ -78,7 +77,7 @@ internal readonly partial struct TriangleGridContouring : IPixelShader<float4>
|
||||
}
|
||||
|
||||
// Based on IQ's signed distance to the segment joining "a" and "b".
|
||||
private static float distEdge(float2 a, float2 b)
|
||||
private static float DistEdge(float2 a, float2 b)
|
||||
{
|
||||
return Hlsl.Dot((a + b) * 0.5f, Hlsl.Normalize((b - a).YX * new float2(-1, 1)));
|
||||
}
|
||||
@@ -188,7 +187,7 @@ internal readonly partial struct TriangleGridContouring : IPixelShader<float4>
|
||||
float2 p1 = default;
|
||||
int iTh = IsoLine(n3, ip0, ip1, ip2, isovalue, i, ref p0, ref p1);
|
||||
|
||||
d = Hlsl.Min(d, distEdge(p - p0, p - p1));
|
||||
d = Hlsl.Min(d, DistEdge(p - p0, p - p1));
|
||||
|
||||
if (iTh == 7)
|
||||
{
|
||||
@@ -206,9 +205,7 @@ internal readonly partial struct TriangleGridContouring : IPixelShader<float4>
|
||||
|
||||
int iTh2 = IsoLine(n3, ip0, ip1, ip2, isovalue, i, ref p0, ref p1);
|
||||
|
||||
d2 = Hlsl.Min(d2, distEdge(p - p0, p - p1));
|
||||
|
||||
float oldD2 = d2;
|
||||
d2 = Hlsl.Min(d2, DistEdge(p - p0, p - p1));
|
||||
|
||||
if (iTh2 == 7) d2 = 0.0f;
|
||||
if (iTh == 7) d2 = 1e5f;
|
||||
|
||||
@@ -14,7 +14,7 @@ internal readonly partial struct TwoTiledTruchet : IPixelShader<float4>
|
||||
/// <summary>
|
||||
/// The current time since the start of the application.
|
||||
/// </summary>
|
||||
public readonly float time;
|
||||
private readonly float time;
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the Truchet distance field.
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする