線形光とハイライトとディザを映像エフェクトの項目に加える
・線形光、ハイライトの持ち上げ、ディザの項目を追加-A
このコミットが含まれているのは:
7ファイル変更
+69
-28
検索条件に一致するファイルはありません
@@ -48,3 +48,11 @@ TagLens,,レンズ,lens,镜头,鏡頭,렌즈,lente,العدسة,lensa
|
||||
TagPsf,,点像分布関数,point spread function,点扩散函数,點擴散函數,점 확산 함수,función de dispersión puntual,دالة انتشار النقطة,fungsi penyebaran titik
|
||||
TagOptics,,光学,optics,光学,光學,광학,óptica,البصريات,optik
|
||||
UpdateAvailableMessage,,新しいバージョン {0} が公開されています。,A new version {0} is available.,新版本 {0} 已发布。,新版本 {0} 已發布。,새 버전 {0}이(가) 공개되었습니다.,La nueva versión {0} ya está disponible.,تم إصدار نسخة جديدة {0}.,Versi baru {0} telah dirilis.
|
||||
Linear,,線形光,Linear Light,线性光,線性光,선형 광,Luz lineal,الضوء الخطي,Cahaya Linear
|
||||
LinearDescription,,畳み込みの前に画素の値を光の強さに比例する値へ直し、結果を表示用の値へ戻します。,"Converts pixel values to values proportional to light intensity before the convolution, and converts the result back for display.",在卷积前将像素值转换为与光强成正比的值,并将结果转换回显示值。,在卷積前將像素值轉換為與光強成正比的值,並將結果轉換回顯示值。,"컨볼루션 전에 픽셀 값을 빛의 세기에 비례하는 값으로 변환하고, 결과를 표시용 값으로 되돌립니다.",Convierte los valores de píxel en valores proporcionales a la intensidad de la luz antes de la convolución y devuelve el resultado a valores de visualización.,يحوّل قيم البكسل إلى قيم تتناسب مع شدة الضوء قبل الالتفاف، ثم يعيد النتيجة إلى قيم العرض.,"Mengubah nilai piksel menjadi nilai yang sebanding dengan intensitas cahaya sebelum konvolusi, lalu mengembalikan hasilnya ke nilai tampilan."
|
||||
HighlightThreshold,,ハイライトのしきい値,Highlight Threshold,高光阈值,高光閾值,하이라이트 임계값,Umbral de altas luces,عتبة الإضاءة العالية,Ambang Sorotan
|
||||
HighlightThresholdDescription,,線形光のとき、画素の最も明るいチャンネルがこの割合を超えると、ハイライトの持ち上げを始めます。,"In linear light, highlight boosting starts when the brightest channel of a pixel exceeds this level.",在线性光下,当像素最亮的通道超过此比例时,开始提升高光。,在線性光下,當像素最亮的通道超過此比例時,開始提升高光。,선형 광에서 픽셀의 가장 밝은 채널이 이 비율을 넘으면 하이라이트를 끌어올리기 시작합니다.,"En luz lineal, el realce de las altas luces comienza cuando el canal más brillante de un píxel supera este nivel.",في الضوء الخطي، يبدأ تعزيز الإضاءة العالية عندما تتجاوز أسطع قناة في البكسل هذا المستوى.,"Pada cahaya linear, peningkatan sorotan dimulai saat kanal paling terang suatu piksel melebihi tingkat ini."
|
||||
HighlightBoost,,ハイライトの強さ,Highlight Boost,高光强度,高光強度,하이라이트 강도,Intensidad de altas luces,شدة الإضاءة العالية,Intensitas Sorotan
|
||||
HighlightBoostDescription,,線形光のとき、しきい値を超えた画素の明るさを最大で何倍に持ち上げるかを指定します。1倍では持ち上げません。,"In linear light, sets the maximum factor by which pixels above the threshold are brightened. 1x applies no boost.",在线性光下,设置超过阈值的像素亮度最多提升的倍数。1倍时不提升。,在線性光下,設定超過閾值的像素亮度最多提升的倍數。1倍時不提升。,선형 광에서 임계값을 넘은 픽셀의 밝기를 최대 몇 배로 끌어올릴지 설정합니다. 1배에서는 끌어올리지 않습니다.,"En luz lineal, establece el factor máximo por el que se aclaran los píxeles por encima del umbral. Con 1x no se aplica realce.",في الضوء الخطي، يضبط أقصى عامل يتم به تفتيح البكسلات التي تتجاوز العتبة. عند 1x لا يُطبَّق أي تعزيز.,"Pada cahaya linear, mengatur faktor maksimum untuk mencerahkan piksel di atas ambang. Pada 1x tidak ada peningkatan."
|
||||
Dither,,ディザ,Dither,抖动,抖動,디더,Tramado,التنقيط,Dither
|
||||
DitherDescription,,出力を8ビットに丸めるとき、画素の位置だけで決まる揺らぎを加えます。段差が目立たなくなり、淡い光が失われにくくなります。,Adds a variation that depends only on pixel position when rounding the output to 8 bits. This hides banding and keeps faint light from being lost.,将输出舍入为8位时,加入仅由像素位置决定的扰动。这能减轻色阶断层,并避免微弱的光丢失。,將輸出捨入為8位元時,加入僅由像素位置決定的擾動。這能減輕色階斷層,並避免微弱的光流失。,출력을 8비트로 반올림할 때 픽셀 위치로만 결정되는 흔들림을 더합니다. 계조의 단차가 눈에 덜 띄고 옅은 빛이 사라지지 않습니다.,Añade una variación que depende solo de la posición del píxel al redondear la salida a 8 bits. Oculta el bandeo y evita que se pierda la luz tenue.,يضيف تغييرًا يعتمد على موضع البكسل فقط عند تقريب المخرجات إلى 8 بت. يخفي ذلك تدرج النطاقات ويمنع فقدان الضوء الخافت.,Menambahkan variasi yang hanya bergantung pada posisi piksel saat membulatkan keluaran ke 8 bit. Ini menyamarkan pita warna dan mencegah cahaya redup hilang.
|
||||
|
@@ -27,6 +27,24 @@ public sealed class WaveOpticsEffect : VideoEffectBase
|
||||
[AnimationSlider("F1", "%", 0, 400)]
|
||||
public Animation Gain { get; } = new(100, 0, 400);
|
||||
|
||||
[Display(GroupName = nameof(Texts.OutputGroup), Name = nameof(Texts.Linear), Description = nameof(Texts.LinearDescription), Order = 2, ResourceType = typeof(Texts))]
|
||||
[ToggleSlider]
|
||||
public bool Linear { get => _linear; set => Set(ref _linear, value); }
|
||||
private bool _linear;
|
||||
|
||||
[Display(GroupName = nameof(Texts.OutputGroup), Name = nameof(Texts.HighlightThreshold), Description = nameof(Texts.HighlightThresholdDescription), Order = 3, ResourceType = typeof(Texts))]
|
||||
[AnimationSlider("F1", "%", 0, 100)]
|
||||
public Animation HighlightThreshold { get; } = new(95, 0, 100);
|
||||
|
||||
[Display(GroupName = nameof(Texts.OutputGroup), Name = nameof(Texts.HighlightBoost), Description = nameof(Texts.HighlightBoostDescription), Order = 4, ResourceType = typeof(Texts))]
|
||||
[AnimationSlider("F1", "x", 1, 100)]
|
||||
public Animation HighlightBoost { get; } = new(1, 1, 1000);
|
||||
|
||||
[Display(GroupName = nameof(Texts.OutputGroup), Name = nameof(Texts.Dither), Description = nameof(Texts.DitherDescription), Order = 5, ResourceType = typeof(Texts))]
|
||||
[ToggleSlider]
|
||||
public bool Dither { get => _dither; set => Set(ref _dither, value); }
|
||||
private bool _dither;
|
||||
|
||||
[Display(GroupName = nameof(Texts.OpticsGroup), Name = nameof(Texts.Wavelength), Description = nameof(Texts.WavelengthDescription), Order = 10, ResourceType = typeof(Texts))]
|
||||
[AnimationSlider("F1", "nm", 380, 780)]
|
||||
public Animation Wavelength { get; } = new(550, 380, 780);
|
||||
@@ -113,5 +131,5 @@ public sealed class WaveOpticsEffect : VideoEffectBase
|
||||
}
|
||||
|
||||
protected override IEnumerable<IAnimatable> GetAnimatables()
|
||||
=> _animatables ??= [Amount, Gain, Wavelength, FNumber, PixelPitch, BladeRotation, Obstruction, Defocus, AstigmatismVertical, AstigmatismOblique, ComaHorizontal, ComaVertical, Spherical];
|
||||
=> _animatables ??= [Amount, Gain, HighlightThreshold, HighlightBoost, Wavelength, FNumber, PixelPitch, BladeRotation, Obstruction, Defocus, AstigmatismVertical, AstigmatismOblique, ComaHorizontal, ComaVertical, Spherical];
|
||||
}
|
||||
@@ -125,7 +125,12 @@ internal sealed class WaveOpticsEffectProcessor : VideoEffectProcessorBase
|
||||
Sanitize(_item.AstigmatismOblique.GetValue(frame, length, fps), -10, 10, 0),
|
||||
Sanitize(_item.ComaHorizontal.GetValue(frame, length, fps), -10, 10, 0),
|
||||
Sanitize(_item.ComaVertical.GetValue(frame, length, fps), -10, 10, 0),
|
||||
Sanitize(_item.Spherical.GetValue(frame, length, fps), -10, 10, 0)));
|
||||
Sanitize(_item.Spherical.GetValue(frame, length, fps), -10, 10, 0)),
|
||||
new LightOptions(
|
||||
_item.Linear,
|
||||
_item.Dither,
|
||||
Sanitize(_item.HighlightThreshold.GetValue(frame, length, fps) / 100d, 0, 1, 0.95),
|
||||
Sanitize(_item.HighlightBoost.GetValue(frame, length, fps), 1, LightOptions.MaximumBoost, 1)));
|
||||
|
||||
if (_isFirst || _amount != amount)
|
||||
_effect.Amount = amount;
|
||||
@@ -245,7 +250,7 @@ internal sealed class WaveOpticsEffectProcessor : VideoEffectProcessorBase
|
||||
}
|
||||
|
||||
var kindChanged = _outputKind != OutputKind.Gpu;
|
||||
var renderState = new RenderState(parameters.Gain, rect);
|
||||
var renderState = new RenderState(parameters.Gain, parameters.Light.Dither, rect);
|
||||
if (convolutionChanged || outputChanged || kindChanged || !_hasOutput || !_hasRenderState || _renderState != renderState)
|
||||
{
|
||||
var count = pipeline.RenderVisible(resourceSet.GetSourceComputeBinding(), resourceSet.GetOutputComputeBinding(), rect, in parameters, _measurements);
|
||||
@@ -298,7 +303,7 @@ internal sealed class WaveOpticsEffectProcessor : VideoEffectProcessorBase
|
||||
return FrameOutcome.PassThrough;
|
||||
|
||||
var kindChanged = _outputKind != OutputKind.Cpu;
|
||||
var renderState = new RenderState(parameters.Gain, rect);
|
||||
var renderState = new RenderState(parameters.Gain, parameters.Light.Dither, rect);
|
||||
var outputChanged = false;
|
||||
if (convolutionChanged || kindChanged || !_hasOutput || !_hasRenderState || _renderState != renderState)
|
||||
{
|
||||
@@ -565,5 +570,6 @@ internal sealed class WaveOpticsEffectProcessor : VideoEffectProcessorBase
|
||||
|
||||
private readonly record struct RenderState(
|
||||
float Gain,
|
||||
bool Dither,
|
||||
WaveOpticsPipeline.PixelRect Rect);
|
||||
}
|
||||
@@ -47,7 +47,7 @@ internal sealed class WaveOpticsCpuPipeline : IDisposable
|
||||
_output = new byte[length];
|
||||
MemoryMarshal.AsBytes(source[..(width * height)]).CopyTo(_packed);
|
||||
var plan = TilePlan.Create(_kernel.Spectrum.Size, _kernel.Spectrum.Radius, 0, 0, width, height);
|
||||
_convolver.Convolve(_packed, 0, 0, width, height, _kernel.Spectrum, plan, _output, parameters.Gain, null);
|
||||
_convolver.Convolve(_packed, 0, 0, width, height, _kernel.Spectrum, plan, _output, parameters.Gain, null, parameters.Light);
|
||||
_output.AsSpan(0, length).CopyTo(MemoryMarshal.AsBytes(destination[..(width * height)]));
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ internal sealed class WaveOpticsCpuPipeline : IDisposable
|
||||
_source = source;
|
||||
_sourceHash = WaveOpticsSourceHash.Compute(source, sourceOffsetX, sourceOffsetY, sourceWidth, sourceHeight);
|
||||
var sourceRect = new WaveOpticsPipeline.PixelRect(sourceOffsetX, sourceOffsetY, sourceWidth, sourceHeight);
|
||||
var key = new WaveOpticsConvolutionKey(_sourceHash.Sum, _sourceHash.Mix, canvasWidth, canvasHeight, sourceRect, WaveOpticsKernel.KeyOf(parameters.Psf));
|
||||
var key = new WaveOpticsConvolutionKey(_sourceHash.Sum, _sourceHash.Mix, canvasWidth, canvasHeight, sourceRect, WaveOpticsKernel.KeyOf(parameters.Psf), parameters.Light.ForConvolution());
|
||||
if (_convolutionKey == key || !TryGetVisibleBounds(canvasWidth, canvasHeight, in parameters, out _))
|
||||
return false;
|
||||
|
||||
@@ -97,7 +97,7 @@ internal sealed class WaveOpticsCpuPipeline : IDisposable
|
||||
if (_convolutionKey is not { } key || !_kernel.IsValid)
|
||||
throw new InvalidOperationException();
|
||||
|
||||
var mode = _tracker.Next(key, rect, parameters.Gain, out var releaseStore);
|
||||
var mode = _tracker.Next(key, rect, parameters.Gain, parameters.Light.Dither, out var releaseStore);
|
||||
if (releaseStore)
|
||||
_store = [];
|
||||
|
||||
@@ -107,7 +107,7 @@ internal sealed class WaveOpticsCpuPipeline : IDisposable
|
||||
|
||||
if (mode == WaveOpticsRenderMode.Stored)
|
||||
{
|
||||
_convolver.RenderStored(_store, rect.Width * rect.Height, parameters.Gain, _output);
|
||||
_convolver.RenderStored(_store, rect.Width * rect.Height, parameters.Gain, _output, parameters.Light, rect.Width, rect.X, rect.Y);
|
||||
return _output.AsSpan(0, length);
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ internal sealed class WaveOpticsCpuPipeline : IDisposable
|
||||
}
|
||||
|
||||
var plan = TilePlan.Create(_kernel.Spectrum.Size, _kernel.Spectrum.Radius, rect.X, rect.Y, rect.Width, rect.Height);
|
||||
_convolver.Convolve(_source, _sourceRect.X, _sourceRect.Y, _sourceRect.Width, _sourceRect.Height, _kernel.Spectrum, plan, _output, parameters.Gain, store);
|
||||
_convolver.Convolve(_source, _sourceRect.X, _sourceRect.Y, _sourceRect.Width, _sourceRect.Height, _kernel.Spectrum, plan, _output, parameters.Gain, store, parameters.Light);
|
||||
return _output.AsSpan(0, length);
|
||||
}
|
||||
|
||||
|
||||
@@ -170,7 +170,8 @@ internal sealed class WaveOpticsPipeline : IDisposable
|
||||
_canvasWidth,
|
||||
_canvasHeight,
|
||||
sourceRect,
|
||||
WaveOpticsKernel.KeyOf(parameters.Psf));
|
||||
WaveOpticsKernel.KeyOf(parameters.Psf),
|
||||
parameters.Light.ForConvolution());
|
||||
if (_convolutionKey == key || !TryGetVisibleBounds(_canvasWidth, _canvasHeight, in parameters, out _))
|
||||
return false;
|
||||
|
||||
@@ -206,15 +207,15 @@ internal sealed class WaveOpticsPipeline : IDisposable
|
||||
in Parameters parameters,
|
||||
Span<ConvolutionMeasurement> measurements)
|
||||
{
|
||||
var mode = BeginRender(rect, parameters.Gain);
|
||||
var mode = BeginRender(rect, parameters.Gain, parameters.Light.Dither);
|
||||
if (mode == WaveOpticsRenderMode.Stored)
|
||||
{
|
||||
_host.RecordStoredRender(_convolver.StoreFor(_storedJob), output, in rect, parameters.Gain).Wait();
|
||||
_host.RecordStoredRender(_convolver.StoreFor(_storedJob), output, in rect, parameters.Gain, parameters.Light).Wait();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Span<Int2> samples = stackalloc Int2[GpuTileConvolver.MaximumSamples];
|
||||
var job = PrepareConvolution(rect, parameters.Gain, mode == WaveOpticsRenderMode.ConvolveAndStore, measurements.IsEmpty ? [] : samples);
|
||||
var job = PrepareConvolution(rect, parameters.Gain, mode == WaveOpticsRenderMode.ConvolveAndStore, measurements.IsEmpty ? [] : samples, parameters.Light);
|
||||
_host.RecordConvolution(
|
||||
source, output, _convolver.Tiles, _convolver.Twiddles, _convolver.Spectrum,
|
||||
_convolver.Report, _convolver.Samples, _convolver.StoreFor(job), in job).Wait();
|
||||
@@ -235,15 +236,15 @@ internal sealed class WaveOpticsPipeline : IDisposable
|
||||
in Parameters parameters,
|
||||
Span<ConvolutionMeasurement> measurements)
|
||||
{
|
||||
var mode = BeginRender(rect, parameters.Gain);
|
||||
var mode = BeginRender(rect, parameters.Gain, parameters.Light.Dither);
|
||||
if (mode == WaveOpticsRenderMode.Stored)
|
||||
{
|
||||
_host.RecordSharedStoredRender(_convolver.StoreFor(_storedJob), output, in rect, parameters.Gain).Wait();
|
||||
_host.RecordSharedStoredRender(_convolver.StoreFor(_storedJob), output, in rect, parameters.Gain, parameters.Light).Wait();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Span<Int2> samples = stackalloc Int2[GpuTileConvolver.MaximumSamples];
|
||||
var job = PrepareConvolution(rect, parameters.Gain, mode == WaveOpticsRenderMode.ConvolveAndStore, measurements.IsEmpty ? [] : samples);
|
||||
var job = PrepareConvolution(rect, parameters.Gain, mode == WaveOpticsRenderMode.ConvolveAndStore, measurements.IsEmpty ? [] : samples, parameters.Light);
|
||||
_host.RecordSharedConvolution(
|
||||
source, output, _convolver.Tiles, _convolver.Twiddles, _convolver.Spectrum,
|
||||
_convolver.Report, _convolver.Samples, _convolver.StoreFor(job), in job).Wait();
|
||||
@@ -260,18 +261,18 @@ internal sealed class WaveOpticsPipeline : IDisposable
|
||||
return count;
|
||||
}
|
||||
|
||||
private WaveOpticsRenderMode BeginRender(PixelRect rect, float gain)
|
||||
private WaveOpticsRenderMode BeginRender(PixelRect rect, float gain, bool dither)
|
||||
{
|
||||
if (_convolutionKey is not { } key || !_kernel.IsValid)
|
||||
throw new InvalidOperationException();
|
||||
|
||||
var mode = _tracker.Next(key, rect, gain, out var releaseStore);
|
||||
var mode = _tracker.Next(key, rect, gain, dither, out var releaseStore);
|
||||
if (releaseStore)
|
||||
ReleaseStoreBuffer();
|
||||
return mode;
|
||||
}
|
||||
|
||||
private GpuTileJob PrepareConvolution(PixelRect rect, float gain, bool store, Span<Int2> samples)
|
||||
private GpuTileJob PrepareConvolution(PixelRect rect, float gain, bool store, Span<Int2> samples, in LightOptions light)
|
||||
{
|
||||
if (_uploadedKernelVersion != _kernel.Version)
|
||||
{
|
||||
@@ -290,7 +291,7 @@ internal sealed class WaveOpticsPipeline : IDisposable
|
||||
}
|
||||
|
||||
var plan = TilePlan.Create(_kernel.Spectrum.Size, _kernel.Spectrum.Radius, rect.X, rect.Y, rect.Width, rect.Height);
|
||||
var job = _convolver.Prepare(plan, _sourceRect.X, _sourceRect.Y, _sourceRect.Width, _sourceRect.Height, gain, samples, store);
|
||||
var job = _convolver.Prepare(plan, _sourceRect.X, _sourceRect.Y, _sourceRect.Width, _sourceRect.Height, gain, samples, store, light);
|
||||
if (store)
|
||||
_storedJob = job;
|
||||
|
||||
@@ -322,7 +323,7 @@ internal sealed class WaveOpticsPipeline : IDisposable
|
||||
_convolutionKey = null;
|
||||
ResetRendering();
|
||||
_sourceRect = new PixelRect(0, 0, width, height);
|
||||
var job = PrepareConvolution(_sourceRect, parameters.Gain, false, []);
|
||||
var job = PrepareConvolution(_sourceRect, parameters.Gain, false, [], parameters.Light);
|
||||
return _host.RecordConvolution(
|
||||
source, output, _convolver.Tiles, _convolver.Twiddles, _convolver.Spectrum,
|
||||
_convolver.Report, _convolver.Samples, _convolver.StoreFor(job), in job);
|
||||
@@ -395,5 +396,5 @@ internal sealed class WaveOpticsPipeline : IDisposable
|
||||
float ComaVertical,
|
||||
float Spherical);
|
||||
|
||||
internal readonly record struct Parameters(float Gain, PsfParameters Psf);
|
||||
internal readonly record struct Parameters(float Gain, PsfParameters Psf, LightOptions Light = default);
|
||||
}
|
||||
@@ -76,11 +76,12 @@ internal sealed partial class WaveOpticsPipelineHost
|
||||
[ComputeResource(ComputeResourceAccess.ReadWrite)] ReadWriteBuffer<Float4> store,
|
||||
[ComputeResource(ComputeResourceAccess.ReadWrite)] ReadWriteTexture2D<Bgra32, Float4> output,
|
||||
in WaveOpticsPipeline.PixelRect rect,
|
||||
float gain)
|
||||
float gain,
|
||||
in LightOptions light)
|
||||
{
|
||||
_ = _device;
|
||||
|
||||
GpuTileConvolver.RecordStored(in context, store, output, rect.Width, rect.Height, gain);
|
||||
GpuTileConvolver.RecordStored(in context, store, output, rect.Width, rect.Height, gain, in light, rect.X, rect.Y);
|
||||
}
|
||||
|
||||
[ComputePipeline]
|
||||
@@ -90,11 +91,12 @@ internal sealed partial class WaveOpticsPipelineHost
|
||||
[ComputeResource(ComputeResourceAccess.ReadWrite)] ReadWriteBuffer<Float4> store,
|
||||
[ComputeResource(ComputeResourceAccess.ReadWrite, Sharing = ComputeResourceSharing.External)] ReadWriteTexture2D<Bgra32, Float4> output,
|
||||
in WaveOpticsPipeline.PixelRect rect,
|
||||
float gain)
|
||||
float gain,
|
||||
in LightOptions light)
|
||||
{
|
||||
_ = _device;
|
||||
|
||||
GpuTileConvolver.RecordStored(in context, store, output, rect.Width, rect.Height, gain);
|
||||
GpuTileConvolver.RecordStored(in context, store, output, rect.Width, rect.Height, gain, in light, rect.X, rect.Y);
|
||||
}
|
||||
|
||||
private static void RecordSourceHashStage(
|
||||
|
||||
@@ -6,7 +6,8 @@ internal readonly record struct WaveOpticsConvolutionKey(
|
||||
int CanvasWidth,
|
||||
int CanvasHeight,
|
||||
WaveOpticsPipeline.PixelRect Source,
|
||||
WaveOpticsPipeline.PsfParameters Psf)
|
||||
WaveOpticsPipeline.PsfParameters Psf,
|
||||
SpectralConvolution.LightOptions Light = default)
|
||||
{
|
||||
public ulong SamplingKey => (ulong)(uint)HashSum << 32 | (uint)HashMix;
|
||||
}
|
||||
@@ -23,10 +24,14 @@ internal sealed class WaveOpticsRenderTracker
|
||||
private WaveOpticsConvolutionKey? _renderedKey;
|
||||
private WaveOpticsPipeline.PixelRect _renderedRect;
|
||||
private float _renderedGain;
|
||||
private bool _renderedDither;
|
||||
|
||||
public bool HasStore { get; private set; }
|
||||
|
||||
public WaveOpticsRenderMode Next(in WaveOpticsConvolutionKey key, WaveOpticsPipeline.PixelRect rect, float gain, out bool releaseStore)
|
||||
=> Next(in key, rect, gain, false, out releaseStore);
|
||||
|
||||
public WaveOpticsRenderMode Next(in WaveOpticsConvolutionKey key, WaveOpticsPipeline.PixelRect rect, float gain, bool dither, out bool releaseStore)
|
||||
{
|
||||
WaveOpticsRenderMode mode;
|
||||
releaseStore = false;
|
||||
@@ -38,7 +43,7 @@ internal sealed class WaveOpticsRenderTracker
|
||||
}
|
||||
else if (HasStore)
|
||||
mode = WaveOpticsRenderMode.Stored;
|
||||
else if (gain != _renderedGain)
|
||||
else if (gain != _renderedGain || dither != _renderedDither)
|
||||
{
|
||||
HasStore = true;
|
||||
mode = WaveOpticsRenderMode.ConvolveAndStore;
|
||||
@@ -49,6 +54,7 @@ internal sealed class WaveOpticsRenderTracker
|
||||
_renderedKey = key;
|
||||
_renderedRect = rect;
|
||||
_renderedGain = gain;
|
||||
_renderedDither = dither;
|
||||
return mode;
|
||||
}
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする