libgdx / box2dlights

Fork of box2dlights by Kalle Hamalainen
Apache License 2.0
257 stars 82 forks source link

[Feature Request] Pixel Art Lights #89

Closed chelinho139 closed 7 years ago

chelinho139 commented 8 years ago

hello, we are developing a Pixel Art Game and using Box2dLights. However, given that we are using pixel art, lights do not look so good..

We would prefer if there was a way to make lights look like this: heroes-of-loot-playstation-vita-1

Is there a way to create this style of lights? I read at the forums that it is posible something like changing the framebuffer size or something like that..

Any ideas? And can it be something posible that it comes in a future update?? Thanks.. The Team.

rinold commented 8 years ago

The rayHandler constructor can accept the frame buffer sizes, by default it's sizes are

(Gdx.graphics.getWidth() / 4, Gdx.graphics.getHeight() / 4)

You can try to make it smaller to have more pixelated lights, also if this will not help, could you please try to disable the blurring - which makes lights look smoother (by default it's also enabled):

rayHandler.setBlur(false)