Libgdx and Box2DLights - too bright + colors graye

2019-07-21 12:12发布

I'm writing a game with LibGDX and Box2DLights for lighting.

The first problem is when my lights overlap each other. I have directional light on sun and point light on character. When they overlap output color is way too bright. I tried changing colors of lights but lowering these makes lights useless when there's only one light(too dark).

My second problem is the colors are a bit grayed out(see on screen).

Image showing my problems - first screen is too bright, second is with only one light(grayed out), and third is without lights(this is how colors should look).

Any ideas how to overcome these problems?

PROBLEM SOLVED

I asked my friend about it and it's all about setting diffuse lighting in RayHandler like this:

rayHandler.useDiffuseLight(true);

Everything works perfectly now.

0条回答
登录 后发表回答