保存した畳み込みの値にゲインを掛けて描く処理を追加する

このコミットが含まれているのは:
routersys committed 2026-10-03 14:10:52 +09:00
1 親 ae0e17ed1b
コミット 36faac26d2
3ファイル変更
+56

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

+9
ファイルの表示
@@ -226,6 +226,15 @@ internal sealed class GpuTileConvolver : IDisposable
context.Barrier(report);
}
public static void RecordStored(
in ComputeContext context,
ReadWriteBuffer<Float4> store,
ReadWriteTexture2D<Bgra32, Float4> output,
int width,
int height,
float gain)
=> context.For(width, height, new StoredRenderShader(store, output, width, height, gain));
public void Dispose()
{
tiles?.Dispose();
+24
ファイルの表示
@@ -16,6 +16,30 @@ internal readonly partial struct ReportResetShader(
}
}
[ThreadGroupSize(DefaultThreadGroupSizes.XY)]
[GeneratedComputeShaderDescriptor]
[CompileOptions(CompileOptions.Default | CompileOptions.IeeeStrictness)]
internal readonly partial struct StoredRenderShader(
ReadWriteBuffer<Float4> store,
ReadWriteTexture2D<Bgra32, Float4> output,
int width,
int height,
float gain) : IComputeShader
{
private readonly ReadWriteBuffer<Float4> store = store;
private readonly ReadWriteTexture2D<Bgra32, Float4> output = output;
private readonly int width = width;
private readonly int height = height;
private readonly float gain = gain;
public void Execute()
{
if (ThreadIds.X >= width || ThreadIds.Y >= height)
return;
output[ThreadIds.XY] = store[ThreadIds.Y * width + ThreadIds.X] * gain;
}
}
[ThreadGroupSize(DefaultThreadGroupSizes.XY)]
[GeneratedComputeShaderDescriptor]
[CompileOptions(CompileOptions.Default | CompileOptions.IeeeStrictness)]