塊の影響範囲が8列で打ち切られるのを直す

このコミットが含まれているのは:
routersys committed 2026-10-13 22:44:35 +09:00
1 親 debdbb6fe9
コミット b56c452b2a
3ファイル変更
+8 -8

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

+5 -6
ファイルの表示
@@ -41,13 +41,12 @@ float4 main(
float density = 0.0;
float2 gradient = float2(0.0, 0.0);
[loop]
for (int offset = -window; offset <= window; offset++)
{
int index = nearest + offset;
if (index < 0 || index >= count)
continue;
int first = max(nearest - window, 0);
int last = min(nearest + window, count - 1);
[loop]
for (int index = first; index <= last; index++)
{
float value = SpectrumLane(values[index >> 2], index & 3);
float reach = (bipolar > 0.5 ? value : abs(value)) * span;
float centreX = -halfWidth + (index + 0.5) * columnWidth;
+2 -1
ファイルの表示
@@ -9,6 +9,7 @@ internal sealed class MetaballSpectrumCustomEffect(IGraphicsDevicesAndContext de
{
public const int MaxValues = 256;
public const int ValueByteSize = MaxValues * sizeof(float);
public const int MaxWindow = 1 << 20;
private enum PropertyIndex
{
@@ -74,7 +75,7 @@ internal sealed class MetaballSpectrumCustomEffect(IGraphicsDevicesAndContext de
public float RimBrightness { get => _cb.RimBrightness; set { _cb.RimBrightness = Math.Clamp(value, 0f, 1f); UpdateConstants(); } }
[CustomEffectProperty(PropertyType.Float, (int)PropertyIndex.Window)]
public float Window { get => _cb.Window; set { _cb.Window = Math.Clamp(value, 0f, 8f); UpdateConstants(); } }
public float Window { get => _cb.Window; set { _cb.Window = Math.Clamp(value, 0f, MaxWindow); UpdateConstants(); } }
[CustomEffectProperty(PropertyType.Float, (int)PropertyIndex.Bipolar)]
public float Bipolar { get => _cb.Bipolar; set { _cb.Bipolar = Math.Clamp(value, 0f, 1f); UpdateConstants(); } }
+1 -1
ファイルの表示
@@ -89,7 +89,7 @@ internal sealed class MetaballSpectrumSource : IAudioSpectrumSource
if (count > 0)
{
var columnWidth = fieldWidth / count;
window = Math.Clamp((int)Math.Ceiling(radius / columnWidth) + 1, 1, 8);
window = (int)Math.Clamp(Math.Ceiling(radius / columnWidth) + 1, 1, MetaballSpectrumCustomEffect.MaxWindow);
}
var parameters = new Parameters(