How to modify box2dlights output properly?

Hello!

Please, advice me simple way to modify box2d lighting result. Libgdx. Isometric projection tiles.

Excluding and including box2dlights rendering.

I’ve made box2dlights generate lights for my floor only and the problem is copying light level from floor to walls upwards pixel by pixel.

Modification must be done by drawing algorithm directly to some instance like framebuffer. I don’t know.

Tried to get finished texture from box2lights by rayHandler.getLightMapTexture(). But it has to be at first positioned, resized, flipped properly, then inserted in framebuffer(??), modified how i want and then maybe processed in shaders.
Box2dlights does much but reading source code does not help me because I’m not familiar with framebuffers\meshes\textures and graphics in general.

Considered modifying box2lights source code to get in the middle of complete rendering process but it also does not seem to be any better.

Experienced opinions, anyone, please.

This one gets pixmap from box2dlights.

FrameBuffer fbo = rayHandler.getLightMapBuffer();
fbo.begin();
Pixmap pixmap = ScreenUtils.getFrameBufferPixmap(0, 0, fbo.getWidth(), fbo.getHeight());
fbo.end();

Thanks to box2lights java coder Rinold https://github.com/rinold.

Keep in mind you can increase box2dlights texture resolution by manually setting it at RayHandler constructor.

rayHandler = new RayHandler(b2world,
                Gdx.graphics.getWidth() / FBO_SIZE_DIVIDER,
                Gdx.graphics.getHeight() / FBO_SIZE_DIVIDER);

To make box2dlights accomodate to compressed vertical view of isometric projection:

package com.b2dlights;
public class PointLight extends PositionalLight
{
    public static final int VERTICAL_COMPRESS_RATIO = 2;
    ...
    void setEndPoints()
    {
        ...
        for (int i = 0; i < rayNum; i++)
        {
            ...
            endX[i] = distance * cos[i];
            endY[i] = distance * sin[i] / VERTICAL_COMPRESS_RATIO;
        }
    }