From 1ff603fcdadcc99bacff2b0c82c6a7a53f2f2eb4 Mon Sep 17 00:00:00 2001 From: routersys Date: Sat, 3 Oct 2026 10:40:19 +0900 Subject: [PATCH] =?UTF-8?q?CPU=E3=81=AE=E7=B5=8C=E8=B7=AF=E3=81=A7?= =?UTF-8?q?=E3=82=B2=E3=82=A4=E3=83=B3=E3=81=A0=E3=81=91=E3=81=AE=E5=A4=89?= =?UTF-8?q?=E5=8C=96=E3=82=92=E4=BD=9C=E6=A5=AD=E3=82=B9=E3=83=AC=E3=83=83?= =?UTF-8?q?=E3=83=89=E3=81=A7=E6=8F=8F=E3=81=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WaveOptics/Rendering/WaveOpticsCpuPipeline.cs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/WaveOptics/Rendering/WaveOpticsCpuPipeline.cs b/WaveOptics/Rendering/WaveOpticsCpuPipeline.cs index 0042df6..0cd7ad7 100644 --- a/WaveOptics/Rendering/WaveOpticsCpuPipeline.cs +++ b/WaveOptics/Rendering/WaveOpticsCpuPipeline.cs @@ -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 store, float gain, Span 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); - } - } }