Libgdx and Box2DLights - too bright + colors grayed out

…衆ロ難τιáo~ 提交于 2020-01-05 03:05:35

问题


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.

来源:https://stackoverflow.com/questions/31388986/libgdx-and-box2dlights-too-bright-colors-grayed-out

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!