Is there a reason you are drawing a quad with a diamond on it versus just rotating the quad to the proper 3D position?
The issue is rounding and blending. The diamond edges don’t overlap but the edges will be blended. You could turn off min/mag filtering for the texture (will look bad) or scale up your quad a bit… or construct your scene a different way.
@pspeed said:
Is there a reason you are drawing a quad with a diamond on it versus just rotating the quad to the proper 3D position?
The issue is rounding and blending. The diamond edges don’t overlap but the edges will be blended. You could turn off min/mag filtering for the texture (will look bad) or scale up your quad a bit… or construct your scene a different way.
thank you very much
for you first question :I just want to draw a 2d diamond map with meshes for my game map, 2d diamond shape map is better than 2d square shape map in my opinion
and
when I set
tex.setMinFilter(Texture.MinFilter.NearestNoMipMaps);
Nearest-style filters give blocky artifacts if the texture gets enlarged or shrunk due to perspective.
A more generally approach is to add a one-pixel border to the texture and copy the opposite texture pixels there.
I think there’s also a texture flag that does that on the fly, with no need to modify your bitmap, but I forgot how to activate it; it should have something with “wrap” in its name.
@harry1315 said:
thank you very much
for you first question :I just want to draw a 2d diamond map with meshes for my game map, 2d diamond shape map is better than 2d square shape map in my opinion
If you understood what I’m saying, the net effect is the same.
But there may be some other reason you go with your approach. If I were doing an isometric game in JME, I’d do it with 3D objects in ortho mode, personally.
@toolforger said:
Nearest-style filters give blocky artifacts if the texture gets enlarged or shrunk due to perspective.
A more generally approach is to add a one-pixel border to the texture and copy the opposite texture pixels there.
I think there’s also a texture flag that does that on the fly, with no need to modify your bitmap, but I forgot how to activate it; it should have something with “wrap” in its name.
Except he wants the transparency. This is not like an atlas. He needs his tiles to overlap sensibly.
So, either there is a fixed zoom (or a range of zooms where his solution is fine)… or there is any kind of zoom in which case there is no border big enough that would prevent the artifacts without looking bad because of the way he’s tiling.