塊の影響範囲が8列で打ち切られるのを直す
このコミットが含まれているのは:
3ファイル変更
+8
-8
検索条件に一致するファイルはありません
@@ -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;
|
||||
|
||||
@@ -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(); } }
|
||||
|
||||
@@ -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(
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする