jme3-lwjgl3 Produces Gaps Between Boxes When Using Lighting Material
See original GitHub issueHi,
On the latest stable JME3 release, using LWJGL3 (org.jmonkeyengine:jme3-lwjgl3:3.5.2-stable
), when I place several boxes next to each other, using the Common/MatDefs/Light/Lighting.j3md
material, there’s always a little dark gap between the boxes. It’s invisible when the camera is really close to it but becomes bigger the farther it is away. When I use LWJGL2 (org.jmonkeyengine:jme3-lwjgl:3.5.2-stable
) there is no such problem.
LWJGL3 produces gaps (unexpected behavior):
LWJGL2 does not produce gaps (expected behavior):
Here is the test setup to reproduce the issue:
for (int x = 0; x < 10; x++) {
for (int y = 0; y < 10; y++) {
Box box = new Box(16, 0.1f, 16);
Geometry geometry = new Geometry("", box);
Material material = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
material.setBoolean("UseMaterialColors", true);
material.setColor("Diffuse", ColorRGBA.Red);
geometry.setMaterial(material);
geometry.setLocalTranslation(32 * x, 0, 32 * y);
rootNode.attachChild(geometry);
}
}
rootNode.addLight(
new DirectionalLight(
new Vector3f(-0.1f, -1f, -0.1f).normalizeLocal(), new ColorRGBA(2f, 2f, 2f, 1f)));
And here is the full example project: https://github.com/tilltheis/Jme3GapTest It has 1 commit linking against LWJGL2 and another commit linking against LWJGL3.
Hint: There is no issue if I use a box height of zero. Therefore I assume the problem is related to the shadow calculation.
Box box = new Box(16, 0, 16);
Please tell me if you need any more input.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
It seems to have been a driver issue!
Thank you for asking me for my driver version. When I looked up my installed version (AMD Software: Adrenalin Edition 22.5.1) I saw that an upgrade was available and installed it (AMD Software: Adrenalin Edition 22.10.2). Now the problem is gone for me.
I’m very sorry to have wasted your time on this issue. But maybe others will find it useful when they run into similar problems. The learning, at least for me, is that AMD products are not the most reliable ones since this isn’t the first HW/SW problem I’ve had with them.
Don’t worry, reporting this issue was the right thing to do, and thank you for following up with the solution. Sometimes these kinds of bugs happen, and they might be related to performance or quality trade-offs enabled in the driver settings rather than the driver itself.
If it happens again, please don’t hesitate to reopen the issue.