Recently I turned on GammaCorrection for my game.
I also use canvas mode.
When GammaCorrection is enabled on the canvas, the entire game screen becomes very black.
When disabled, the screen is the same as the regular window.
This looks like a bug.
I searched the forum but nothing helped.
So I tried to solve this problem myself.
After I compared the differences between LwjglCanvas and LwjglDisplay.
I found that LwjglDisplay sets GammaCorrection after “Display.create”
But LwjglCanvas is set before it.
So I copied the GammaCorrection setting and placed it after “Display.create” like this:
well, im not specialist here, but GammaCorrection or rather sRGB as far as i know is new standard now.
and now its default in JME since some version i remember.
you no need do this 2 lines on screenshot (maybe you did setup them incorrectly before, because i belive gamma correction setting should setup SRGB itself)
linearize setting even if not true, it know if fix color or not.
But the thing you need to be carefull about is providing custom color.
like
new ColorRGBA().setAsSrgb(
About textures JME automatically convert them,
unless you have -LINEAR in j3md that you need use for normalmaps/etc. (-LINEAR skip conversion)
Previously! I had GammaCorrection turned off by default due to some compatibility reasons, but recently I decided to turn it on and discovered this issue.
I don’t know if I’m the only one having this problem, maybe I didn’t do enough testing.
With GammaCorrection turned off, the scene looks the same.
You can see the image below.