I’m having two issues and not exactly sure how to go about fixing them.
In both screenshots there is a line showing at the top of the vertical quads. It is a hard to see green line in the left black area. I have verified this line is not in my image file.
Second issue does not occur all of the time and can be seen by comparing the two images. In the first image the wall closest to the camera is drawing correctly and it does 9 time out of 10 but the sometimes it ends up like what is seen in the second screenshot.
borderMaterial = new Material(app.getAssetManager(), “Common/MatDefs/Misc/Unshaded.j3md”);
TextureKey key3 = new TextureKey(“Textures/grassborder.png”);
Texture tex3 = app.getAssetManager().loadTexture(key3);
Loading Into World
Quad border = new Quad(10, 5);
border.scaleTextureCoordinates(new Vector2f(2, 1));
Is your wall by any chance in the transparent bucket? cause this looks like sorting problems for me.
Have you defined the alphadiscard stuff correctly? SO the depth buffer is nto written for transparent pixels?
Even in the screen shot with the wall, you can see a sorting issue because it looks like the west wall is drawn over the south wall… this also suggests that depth write or depth test are turned off for some reason.
Thanks for the help. Figured I was missing something simple and somewhat obvious. I removed all of the render states that I had and am now just using the following. This fixed all of the issues on the desktop version. The android issues have now changed. The west wall that is behind the alpha area of the north wall are being clipped.
From what I’ve read my issue is that I’m not setting the alphathreshold of the unshaded material. I’m still new to jmonkey and haven’t done much with shaders so I’m not sure how I would set it. As it is late here I’m just going to post this and pick this back up after work tomorrow.
I had tried the setDepthTest before and didn’t notice any change. Just to be safe I put it back in and did a clean and build. There was no noticeable change between the desktop and android versions with this line.