Annotations
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m22s
CI / Windows Release Package (push) Successful in 2m28s

This commit is contained in:
2026-05-08 20:01:22 +10:00
parent 8afef5065a
commit 163d70e9bd
11 changed files with 85 additions and 0 deletions

View File

@@ -1,5 +1,7 @@
float boxMask(float2 point, float2 halfSize, float feather)
{
// Signed-distance box mask gives the chart and border pixel-sized feathered
// edges without branching per side.
float2 distanceToEdge = abs(point) - halfSize;
float outsideDistance = length(max(distanceToEdge, float2(0.0, 0.0)));
float insideDistance = min(max(distanceToEdge.x, distanceToEdge.y), 0.0);
@@ -31,6 +33,8 @@ float applyToneCurve(float linearLevel)
float patchBrightness(int patchIndex, int count)
{
int clampedIndex = clamp(patchIndex, 0, max(count - 1, 0));
// Each patch is one stop brighter than the previous patch until it clips at
// the requested peak level, matching the Xyla-style exposure ramp.
float linearLevel = baseLevel * exp2(float(clampedIndex));
linearLevel = min(linearLevel, peakLevel);
return applyToneCurve(linearLevel);
@@ -60,6 +64,8 @@ float4 shadeVideo(ShaderContext context)
if (reverseOrder)
patchIndex = count - 1 - patchIndex;
// Build each patch as a slot along the main axis, then mask the cross-axis
// extents so vertical and horizontal charts share the same logic.
float patchSlotCenter = (floor(patchPosition) + 0.5) / float(count);
float localAxis = abs(normalizedAxis - patchSlotCenter) * float(count) * 2.0;
float safeGapSize = saturate(gapSize);