TASK 51 slice 4: camera-path hookup — CameraManager renders per-scene effect variants (one segmentation per raw frame on a latest-frame-drop worker, raw path untouched), VM declares/adopts variants per config; separable upsampling cuts Remove 46->3 ms, Blur 80->18 ms (Debug, 720p) (Unit: bg-effects hookup)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using ytLive.Models;
|
||||
|
||||
namespace ytLive.Services.BackgroundEffects;
|
||||
|
||||
/// <summary>Identifies one rendered variant of a camera's frames (TASK 51): the effect plus its
|
||||
/// strength, rounded to 2 decimals so a slider drag doesn't spawn a variant per pixel of travel.
|
||||
/// <see cref="BackgroundEffect.None"/> always normalizes to strength 0 — the raw path.</summary>
|
||||
public readonly record struct WebcamEffectKey(BackgroundEffect Effect, double Strength)
|
||||
{
|
||||
public static WebcamEffectKey None => new(BackgroundEffect.None, 0);
|
||||
|
||||
public static WebcamEffectKey For(BackgroundEffect effect, double strength)
|
||||
=> effect == BackgroundEffect.None
|
||||
? None
|
||||
: new WebcamEffectKey(effect, Math.Round(Math.Clamp(strength, 0, 1), 2));
|
||||
}
|
||||
Reference in New Issue
Block a user