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:
2026-10-09 10:27:38 -07:00
parent 55210b9a61
commit de22983b36
10 changed files with 524 additions and 78 deletions
@@ -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));
}