Recently I have been trying to learn how to use Box2D lights. I have tried implementing them into one of my simple games. Everything worked and looked nice (on PC) until I run it on my phone. The lights looks completely different and I don't even know how to describe it. Instead of good and smooth light effects it looks like I am moving through some kind of goo. Another thing I noticed is that when I try to record it with OBS it looks the same as on my phone. I tried it on my brothers phone and to my surprise it looks exactly like on my computer. If anyone has encountered this kind of behaviour or may know what it might be caused by I would be grateful for even a name of how to call it. Changing the amount of rays does not seem to do much. I have tried to record this on brother's phone too, but it behaves in the same way PC recording does.
My phone (Xiaomi mi mix 3)
My brother's phone (Huawei P10 lite)
How it looks on my phone: https://youtu.be/fq_J6A95D2Y
Here is screen of how it look on PC, the "OutLines" of light are still visible but much less: https://i.stack.imgur.com/psVZk.jpg
Here is code related to light:
`RayHandler.useDiffuseLight(true);
rayHandler = new RayHandler(world);
rayHandler.setAmbientLight(0.1f,0.1f,0.1f,0.2f);
rayHandler.setCulling(true);`
Without useDiffuseLight it looks even worse. Culling doesn't seem to do anything related to my problem.
lightArray = new Array<>();
int rays = 2048;
int distance = 8;
Color color = new Color(0.5f,0.5f,0.5f,1);
PointLight light1 = new PointLight(context.getRayHandler(),rays,color,distance,3,3);
PointLight light2 = new PointLight(context.getRayHandler(),rays,color,distance,3,13);
PointLight light3 = new PointLight(context.getRayHandler(),rays,color,distance,6,3);
PointLight light4 = new PointLight(context.getRayHandler(),rays,color,distance,6,13);
lightArray.add(light1);
lightArray.add(light2);
lightArray.add(light3);
lightArray.add(light4);
for(Light light:lightArray){
light.setSoftnessLength(1);
light.setSoft(true);
}
Number of rays does not seem to change anything related to my problem. (I have tried this with 64,128,1024,4096 and the "Out lines still look the same"). Turning off the softness does not change anything related to my problem.
playerLight = new PointLight(context.getRayHandler(),2048,new
Color(0.4f,0.4f,0.4f,1f),5,playerBody.getPosition().x,playerBody.getPosition().y);
playerLight.attachToBody(playerBody);
rayHandler.setCombinedMatrix(context.getCamera());
rayHandler.updateAndRender();
This is called after shapeRenderer and SpriteBatch have drawn everything.