(Box2dLights) Disable Light for a certain Texture?

68 Views Asked by At

I want add stars on my 2D game, like Terraria-Starbound-Minecraft (School project and hobby).

https://i.stack.imgur.com/fCGH3.png

Perfect, but when the night comes... The stars are dark!
https://i.stack.imgur.com/3MbgM.png

I want show the stars without the effects of Box2dLights.
I tried using this code:

@Override
public void render(float delta) {
    ....
    stage.draw();
    ....
    rayHandler.setCombinedMatrix(stage.getCamera().combined.cpy().scale(Constants.PIXELS_IN_METER, Constants.PIXELS_IN_METER, 5f));
    rayHandler.updateAndRender();
    ....
    stars.draw();
}

But...
https://i.stack.imgur.com/q9zAS.png

I want show the stars without the effects of Box2dLights.

0

There are 0 best solutions below