Remove unnecessary parentheses

このコミットが含まれているのは:
Sergio Pedri committed 2022-10-15 09:10:18 -07:00
1 親 d910922ef5
コミット 8be9203a1c
18ファイル変更
+35 -36

検索条件に一致するファイルはありません

+3 -3
ファイルの表示
@@ -165,7 +165,7 @@ internal readonly partial struct ContouredLayers : IPixelShader<float4>
float4 c = MapLayer(new float3(uv, 1.0f), fi);
float4 cSh = MapLayer(new float3(uv - (new float2(0.03f, -0.03f) * (((flNum - fi) / flNum * 0.5f) + 0.5f)), 1.0f), fi);
float sh = (fi + 1.0f) / (flNum);
float sh = (fi + 1.0f) / flNum;
float3 lCol = GetColor(uv, sh, fi + 1.0f);
float3 ld = Hlsl.Normalize(new float3(-1, 1, -0.25f));
float3 n = Hlsl.Normalize(new float3(0.0f, 0.0f, -1.0f) + c.YZW);
@@ -181,8 +181,8 @@ internal readonly partial struct ContouredLayers : IPixelShader<float4>
col = Hlsl.Lerp(col, float3.Zero, (1.0f - Hlsl.SmoothStep(0.0f, sfLSh, Hlsl.Max(cSh.X, pL))) * shF);
col = Hlsl.Lerp(col, float3.Zero, (1.0f - Hlsl.SmoothStep(0.0f, sfL * 3.0f, c.X)) * 0.25f);
col = Hlsl.Lerp(col, float3.Zero, (1.0f - Hlsl.SmoothStep(0.0f, sfL, c.X)) * 0.85f);
col = Hlsl.Lerp(col, eCol * hatch, (1.0f - Hlsl.SmoothStep(0.0f, sfL, c.X + (Hlsl.Length(c.YZX) * 0.003f))));
col = Hlsl.Lerp(col, lCol * hatch, (1.0f - Hlsl.SmoothStep(0.0f, sfL, c.X + (Hlsl.Length(c.YZX) * 0.006f))));
col = Hlsl.Lerp(col, eCol * hatch, 1.0f - Hlsl.SmoothStep(0.0f, sfL, c.X + (Hlsl.Length(c.YZX) * 0.003f)));
col = Hlsl.Lerp(col, lCol * hatch, 1.0f - Hlsl.SmoothStep(0.0f, sfL, c.X + (Hlsl.Length(c.YZX) * 0.006f)));
pL = c.X;
}
+2 -2
ファイルの表示
@@ -55,8 +55,8 @@ internal readonly partial struct MengerJourney : IPixelShader<float4>
float diffuse2 = Hlsl.Max(0.0f, Hlsl.Dot(-normal, lightDir2));
return
((diffuse * Diffuse) * (LightColor * color)) +
((diffuse2 * Diffuse) * (LightColor2 * color));
(diffuse * Diffuse * (LightColor * color)) +
(diffuse2 * Diffuse * (LightColor2 * color));
}
/// <summary>
+1 -1
ファイルの表示
@@ -84,7 +84,7 @@ internal readonly partial struct ProteanClouds : IPixelShader<float4>
float3 pos = ro + (t * rd);
float2 mpv = Map(pos, prm1, bsMo);
float den = Hlsl.Clamp(mpv.X - 0.3f, 0.0f, 1.0f) * 1.12f;
float dn = Hlsl.Clamp((mpv.X + 2.0f), 0.0f, 3.0f);
float dn = Hlsl.Clamp(mpv.X + 2.0f, 0.0f, 3.0f);
float4 col = 0f;
if (mpv.X > 0.6f)
+2 -2
ファイルの表示
@@ -84,7 +84,7 @@ internal readonly partial struct PyramidPattern : IPixelShader<float4>
p -= ip + 0.5f;
float ang = (-3.14159f * 3.0f / 5.0f) + ((FBM((ip / 8.0f) + (time / 3.0f))) * 6.2831f * 2.0f);
float ang = (-3.14159f * 3.0f / 5.0f) + (FBM((ip / 8.0f) + (time / 3.0f)) * 6.2831f * 2.0f);
float2 offs = new float2(Hlsl.Cos(ang), Hlsl.Sin(ang)) * 0.35f;
@@ -121,7 +121,7 @@ internal readonly partial struct PyramidPattern : IPixelShader<float4>
float fx2 = BMap(p + e.XY);
float fy2 = BMap(p + e.YX);
float3 grad = (new float3(fx - fx2, fy - fx2, 0)) / e.X / 2.0f;
float3 grad = new float3(fx - fx2, fy - fx2, 0) / e.X / 2.0f;
edge = Hlsl.Length(new float2(fx, fy) + new float2(fx2, fy2) - (f * 2.0f));
edge = Hlsl.SmoothStep(0.0f, 1.0f, edge / e.X);
+9 -9
ファイルの表示
@@ -205,7 +205,7 @@ internal readonly partial struct TriangleGridContouring : IPixelShader<float4>
d = 0;
}
d3 = Hlsl.Min(d3, DistLine((p - p0), (p - p1)));
d3 = Hlsl.Min(d3, DistLine(p - p0, p - p1));
d4 = Hlsl.Min(d4, Hlsl.Min(Hlsl.Length(p - p0), Hlsl.Length(p - p1)));
float tri = Hlsl.Min(Hlsl.Min(DistLine(p - ip0, p - ip1), DistLine(p - ip1, p - ip2)), DistLine(p - ip2, p - ip0));
@@ -229,7 +229,7 @@ internal readonly partial struct TriangleGridContouring : IPixelShader<float4>
}
d2 = Hlsl.Max(d2, -d);
d3 = Hlsl.Min(d3, DistLine((p - p0), (p - p1)));
d3 = Hlsl.Min(d3, DistLine(p - p0, p - p1));
d4 = Hlsl.Min(d4, Hlsl.Min(Hlsl.Length(p - p0), Hlsl.Length(p - p1)));
d4 -= 0.075f;
d3 -= 0.0125f;
@@ -249,12 +249,12 @@ internal readonly partial struct TriangleGridContouring : IPixelShader<float4>
if (d > 0.0f)
{
col = Hlsl.Lerp(col, new float3(1, 1.85f, 3) * 0.3f, (1.0f - Hlsl.SmoothStep(0.0f, sf, d2 - 0.012f)));
col = Hlsl.Lerp(col, new float3(1, 1.85f, 3) * 0.3f, 1.0f - Hlsl.SmoothStep(0.0f, sf, d2 - 0.012f));
}
col = Hlsl.Lerp(col, new float3(1.1f, 0.85f, 0.6f), (1.0f - Hlsl.SmoothStep(0.0f, sf, d2)));
col = Hlsl.Lerp(col, new float3(1.5f, 0.9f, 0.6f) * 0.6f, (1.0f - Hlsl.SmoothStep(0.0f, sf, d - 0.012f)));
col = Hlsl.Lerp(col, new float3(1, 0.8f, 0.6f) * new float3(0.7f, 1.0f, 0.75f) * 0.95f, (1.0f - Hlsl.SmoothStep(0.0f, sf, d)));
col = Hlsl.Lerp(col, new float3(1.1f, 0.85f, 0.6f), 1.0f - Hlsl.SmoothStep(0.0f, sf, d2));
col = Hlsl.Lerp(col, new float3(1.5f, 0.9f, 0.6f) * 0.6f, 1.0f - Hlsl.SmoothStep(0.0f, sf, d - 0.012f));
col = Hlsl.Lerp(col, new float3(1, 0.8f, 0.6f) * new float3(0.7f, 1.0f, 0.75f) * 0.95f, 1.0f - Hlsl.SmoothStep(0.0f, sf, d));
if (d2 > 0.0f)
{
@@ -269,9 +269,9 @@ internal readonly partial struct TriangleGridContouring : IPixelShader<float4>
col *= (pat * 0.425f) + 0.75f;
col = Hlsl.Lerp(col, float3.Zero, (1.0f - Hlsl.SmoothStep(0.0f, sf, d5)) * 0.95f);
col = Hlsl.Lerp(col, float3.Zero, (1.0f - Hlsl.SmoothStep(0.0f, sf, d3)));
col = Hlsl.Lerp(col, float3.Zero, (1.0f - Hlsl.SmoothStep(0.0f, sf, d4)));
col = Hlsl.Lerp(col, float3.One, (1.0f - Hlsl.SmoothStep(0.0f, sf, d4 + 0.005f)));
col = Hlsl.Lerp(col, float3.Zero, 1.0f - Hlsl.SmoothStep(0.0f, sf, d3));
col = Hlsl.Lerp(col, float3.Zero, 1.0f - Hlsl.SmoothStep(0.0f, sf, d4));
col = Hlsl.Lerp(col, float3.One, 1.0f - Hlsl.SmoothStep(0.0f, sf, d4 + 0.005f));
float2 q = oP * 1.5f;
+1 -1
ファイルの表示
@@ -46,7 +46,7 @@ public sealed partial class App : Application
// For good measure, also start a timer of one second. If the app is still alive by then (ie. if the timer callback is
// executed at all), then just force the whole process to terminate, and exit with the E_APPLICATION_EXITING error code.
this.shutdownTimer = new Timer(_ => Environment.Exit(unchecked((int)(0x8000001A))), this, 1000, Timeout.Infinite);
this.shutdownTimer = new Timer(_ => Environment.Exit(unchecked((int)0x8000001A)), this, 1000, Timeout.Infinite);
};
this.mainWindow.Activate();