LibreShift / red-moon

Android screen filter app for night time phone use.
GNU General Public License v3.0
642 stars 80 forks source link

Spatially Varying Filter for Leveling Brightness #334

Open torridgristle opened 1 year ago

torridgristle commented 1 year ago

The problem: With astigmatism, bright things bloom out, blur, and glow, obscuring neighboring elements that are darker. When the entire screen is darkened the effect seems to worsen.

Concept for solution: Darken the brighter things more.

As I understand it, the darkening is an overlayed red image rather than adjusting the color settings of the display, which should allow for different values at different regions of the screen.

If the current screen content can be captured by a program and detect areas that are brighter than their surroundings, then perhaps the overlayed red image could be modified to be darker or more opaque in that area to even out the brightness of the screen. Like tonemapping. With some degree of smoothing between values, either by lerping the current overlay to the new overlay a little bit each time the screen is captured, or something more reactive that works faster to darken and slower to lighten, or the other way around.

I don't know what Android will actually allow though, but I'm pretty sure it's a pipe dream.

smichel17 commented 1 year ago

This sounds cool, but whether it is possible / how to do it is above my current level of Android knowledge. If it is possible, I would guess it would be through an accessibility setting or would require root.