I am facing a problem while porting one of my libGDX project from desktop to Android : My game uses Box2DLights. While the light effect look very fancy on the desktop version of the game, it looks really ugly on the Android version. The light gradient is not smooth at all. Take a look at the comparative screenshot below :
To use Box2DLights in my game, I use this code in my GameScreen :
rayHandler = new RayHandler(world);
rayHandler.resizeFBO(Gdx.graphics.getWidth()/5, Gdx.graphics.getHeight()/5);
rayHandler.setBlur(true);
RayHandler.useDiffuseLight(true);
rayHandler.setAmbientLight(new Color(0.15f, 0.15f, 0.15f, 0.1f));
Of course, I tried to play with different parameters, such as :
RayHandler.useDiffuseLight(fasle);
Or
rayHandler.diffuseBlendFunc.set(GL20.GL_DST_COLOR, GL20.GL_SRC_COLOR);
Or
rayHandler.shadowBlendFunc.set(GL20.GL_DST_COLOR, GL20.GL_SRC_COLOR);
Everything I tried so fare gave the same ugly light gradient. I already played games that uses Box2DLights that rendered very well on my tablet, thus, I don't think it's due to a limitation of Android.
Does anybody know what's the trick to overcome this problem ?
Thanks !