CPUの経路でゲインだけの変化を作業スレッドで描く
このコミットが含まれているのは:
1ファイル変更
+1
-12
@@ -107,7 +107,7 @@ internal sealed class WaveOpticsCpuPipeline : IDisposable
|
||||
|
||||
if (mode == WaveOpticsRenderMode.Stored)
|
||||
{
|
||||
RenderStored(_store.AsSpan(0, length), parameters.Gain, _output.AsSpan(0, length));
|
||||
_convolver.RenderStored(_store, rect.Width * rect.Height, parameters.Gain, _output);
|
||||
return _output.AsSpan(0, length);
|
||||
}
|
||||
|
||||
@@ -134,15 +134,4 @@ internal sealed class WaveOpticsCpuPipeline : IDisposable
|
||||
_convolutionKey = null;
|
||||
_tracker.Reset();
|
||||
}
|
||||
|
||||
private static void RenderStored(ReadOnlySpan<float> store, float gain, Span<byte> output)
|
||||
{
|
||||
for (var index = 0; index < store.Length; index += Channels)
|
||||
{
|
||||
output[index] = CpuTileConvolver.ToUnorm(store[index + 2] * gain);
|
||||
output[index + 1] = CpuTileConvolver.ToUnorm(store[index + 1] * gain);
|
||||
output[index + 2] = CpuTileConvolver.ToUnorm(store[index] * gain);
|
||||
output[index + 3] = CpuTileConvolver.ToUnorm(store[index + 3] * gain);
|
||||
}
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする