Open ghost opened 6 years ago
Gamma correction won't work on android unless it's using opengl es 3. The setting is not exposed on purpose. Maybe we should allow it only if opengl version is es 3 but some test have to be done to ensure that it's working exactly the same than on desktop
For information we need those 2 things: this extension https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_framebuffer_sRGB.txt and srgb image formats https://www.khronos.org/opengl/wiki/Image_Format#sRGB_colorspace
I will investigate this problem & see if i can do something here.....
Have you made any leeway on this, @Scrappers-glitch?
Have you made any leeway on this, @Scrappers-glitch?
i have tried to enable the gamma correction via this snippet :
ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
ConfigurationInfo info = am.getDeviceConfigurationInfo();
// above OGLES3.0, enable sRGB
if (info.reqGlEsVersion >= 0x30000) {
renderer.setMainFrameBufferSrgb(settings.getBoolean("GammaCorrection"));
}
for OGLES3.0 & up from OGLESContext.java
class, directly using the AppSettings#getBoolean("GammaCorrection")
before initializing the renderer here :
Generally saying, to enable gamma correction, you have to enable the sRGB frameBuffer from the renderer class using:
, but it didn't work, @Markil3 if you have any suggestions, please let me know.
There is no protected field available in com.jme3.app.AndroidHarness to enable/disable gamma correction. This can be fixed by adding a protected field and adding it to the AppSettings initialization code.
https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-android/src/main/java/com/jme3/app/AndroidHarness.java#L223