You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ee5801c
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/help/help.json
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1295,6 +1295,17 @@
1295
1295
"sampling": {
1296
1296
"line": "One pixel per light, or the mean of the light's rectangle.",
1297
1297
"more": "**point** takes the one pixel at a light's center, sharp and the fastest. With **area** each light averages its rectangle of the picture, so fine detail stays steady when a large picture shrinks onto few lights."
1298
+
},
1299
+
"edgeDepth": {
1300
+
"line": "How far in the edge lights look, in percent; 0 is their own share.",
1301
+
"more": "A border strip's outermost lights own a sliver at the edge, where letterboxes and overscan live. Raise **edgeDepth** and they reach further in, as Hyperion's 8% does; a stride keeps the reads the same."
1302
+
},
1303
+
"smoothing": {
1304
+
"line": "How slowly a light eases to a new color, as a half-life; 0 is off.",
1305
+
"more": "Raise **smoothing** and a light eases toward its new color, settling a noisy source alike on every source and board. A cut is a real jump, so **snapAbove** lands a bigger move whole; at 0 every move eases."
1306
+
},
1307
+
"snapAbove": {
1308
+
"line": "A channel moving further than this jumps instead of easing."
Copy file name to clipboardExpand all lines: src/light/effects/PictureEffect.h
+81-3Lines changed: 81 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -26,26 +26,51 @@ class PictureEffect : public EffectBase {
26
26
/// One pixel per light, or the mean of the light's rectangle.
27
27
/// @guide **point** takes the one pixel at a light's center, sharp and the fastest. With **area** each light averages its rectangle of the picture, so fine detail stays steady when a large picture shrinks onto few lights.
28
28
uint8_t sampling = kPoint;
29
+
/// How far in the edge lights look, in percent; 0 is their own share.
30
+
/// @guide A border strip's outermost lights own a sliver at the edge, where letterboxes and overscan live. Raise **edgeDepth** and they reach further in, as Hyperion's 8% does; a stride keeps the reads the same.
31
+
uint8_t edgeDepth = 0;
32
+
/// How slowly a light eases to a new color, as a half-life; 0 is off.
33
+
/// @guide Raise **smoothing** and a light eases toward its new color, settling a noisy source alike on every source and board. A cut is a real jump, so **snapAbove** lands a bigger move whole; at 0 every move eases.
34
+
uint8_t smoothing = 0;
35
+
/// A channel moving further than this jumps instead of easing.
// What an edge cell reaches instead of its own share, deeper OR shallower. The control sets the depth rather than raising a floor under it, and 0 leaves every cell its share.
125
+
constuint32_t deep = static_cast<uint32_t>(pic) * edgeDepth / 100u;
90
126
for (uint32_t i = 0; i < n; i++) {
91
127
constint32_t k = static_cast<int32_t>(i) - offset;
92
128
if (k < 0 || k >= used) { out[i] = {0, 0}; continue; }
93
129
uint32_t lo = static_cast<uint32_t>(k) * pic / static_cast<uint32_t>(used), hi = (static_cast<uint32_t>(k) + 1) * pic / static_cast<uint32_t>(used);
130
+
if (deep) reachEdge(k, used, pic, deep, lo, hi);
94
131
if (hi <= lo) hi = lo + 1; // a picture smaller than the grid: neighboring cells share a pixel
constint32_t now = jump ? wanted : easeToward(state_[slot], wanted, keep);
175
+
state_[slot] = static_cast<uint16_t>(now);
176
+
out[ch] = static_cast<uint8_t>(now >> 8);
177
+
if (now != wanted) settling_ = true;
178
+
}
179
+
returnRGB{out[0], out[1], out[2]};
180
+
}
181
+
182
+
public:
183
+
/// Exponential smoothing: `held` moves toward `wanted`, both 8.8, leaving `keep` (0..65536, from `halfLifeKeep`) of the gap. A step below one count still moves one, so a light arrives; no time passed moves nothing.
// A border strip's outermost lights own a sliver at the edge, where a letterbox and the overscan junk live, so edgeDepth reaches further in. Smoothing eases a light toward its new color.
141
+
142
+
// The control sets the depth rather than raising a floor under it, so on a coarse grid an edge cell takes less than its own share.
143
+
TEST_CASE("PictureEffect edgeDepth gives the outermost lights the depth they ask for") {
144
+
// Four columns over 100 picture columns: each owns 25, so 10% is deliberately shallower.
0 commit comments