0

我正在通过网络上的教程尝试学习 libgdx(到目前为止,我对它的强大感到惊讶)并且我试图弄清楚如何使阴影呈现出柔和的边缘,它们是块状的,特别是在多个重叠的光源。下图说明了我的意思。在此处输入图像描述

这是具有高光线计数的

new PointLight(handler, 5000, Color.GREEN, 80, width, height);
    new PointLight(handler, 5000, new Color(0.2f, 0.3f, 0.4f, 1), 200,
            width / 2, height / 2);
    new ConeLight(handler, 5000, new Color(0.9f, 0.2f, 0.3f, 1), 200,
            width / 2, height, 0, 117);

cfg.useGL20 = true;

4

1 回答 1

1

我有同样的问题,在谷歌上搜索并找到了这个。所以我就简单回答一下。诀窍是重载默认的 RayHandler fbo 大小:

从:

handler = new RayHandler(world);

至:

handler = new RayHandler(world, width, height);
于 2013-06-21T22:11:59.873 回答