In old versions of JMonkeyEngine, gamma correction was implemented using the
GammaCorrectionFilter class (in the “jme3-effects” library) to correct the displayed pixels.
In JMonkeyEngine v3.2, an
AppSettings flag was added, which not only corrected the displayed pixels, but also linearized certain textures loaded from assets. At that time,
GammaCorrectionFilter was deprecated, apparently to prod developers into using the
AppSettings flag instead.
GammaCorrectionFilter was never deleted, and it still has valid uses. For instance, it was formerly used to provide contrast adjustment in
SkyControl (see issue 781). It could also be used to implement gamma correction for frame buffers that aren’t sRGB-capable, such as Androids with OpenGL version < ES 3 (see issue 809).
Perhaps deprecation was a good idea at the time, but after four years, any developer still using the filter is unlikely to switch simply because it’s deprecated.
I’d like to see issue 781 resolved in v3.5. I’m considering various approaches. For instance:
- simply un-deprecate the existing filter
- delete the deprecated filter and create a new filter specifically designed for contrast adjustment (which could also be configured for gamma correction)
How should we proceed?