Hi,
When I have a texture with some transparency for the water, it is being drawn like this:
any ideas?
Thanks
Hi,
When I have a texture with some transparency for the water, it is being drawn like this:
any ideas?
Thanks
You might need to actual provide some information as to what is wrong and how you are currently doing what is wrong. We are not mind readers
I use GIMP for my artwork, so the water tile is part of a big texture, I apply color to alpha using gimp for that particular tile so its
‘see through’, when drawn in my game I get the artifacts that are shown.
The code below is what is used to render from a 2d array (there’s some other stuff for occlusion culling etc, but this is the drawing part):
worldMap[col][row].draw(batch, region, col, row);
Where worldMap is a 2d array of type BlankEntity and draw method is as simple as:
public void draw(Batch batch, TextureRegion[][] t, int x, int y) {
batch.draw(t[2][0], x << 4, y << 4);
}
Does this help at all? Like I said, it is only when I’ve applied color to alpha to that particular tile…Was thinking it maybe needs blend function setting or something?
Thanks
It doesn’t look like texture-bleeding.
It could be that in your transparent image, you have a little bit still in the bottom-left (It looks like one pixel, and it could be very transparent). Open it in gimp and select that area, then press CTRL+X to cut out all the pixels.
Lol,
Yep, on zooming in it was a stray pixel! I spent over an hour modifying my code too…
Many thanks.
Lol, yeah