PVR Texture Compression Film (Edge Context Exposure)

I have a PVR texture compression that works all happy and good in my game with the iPhone, but I have problems when you split several textures together. Basically, I have a very large background, which is divided into several 512x512 fragments, all PVRs are compressed. Then they come together to look like one large background image. The PVR method works because it does not know that it should compress the texture as if it were a really large texture, i.e. Used neighbor information to determine how to perform PVR compression.

I might think maybe a couple of ways to do this.

1) Somehow tell the texturetool command-line program to place other images that will be adjacent.
2) Use a command-line program to create a huge PVR texture that represents the entire image, and then somehow breaks the bytes into several images - perhaps not possible.
3) Do some OpenGL ES trick that blends edges well.
4) Do some tricks when I have redundant information in each tile, and then fix these areas when painting the texture (please not).

I hope I can make 1, 2 or 3, or there is another well-known solution.

+4
source share
2 answers

I ended up with option 4. I do not think it was a situation where PVRTC is not suitable - in fact it is almost a necessity. When I get a total of 24 512x512 textures in my memory right away (representing a very large background and foreground), putting in uncompressed is suicide. Therefore, I just used PVR compression as usual, then I edited a few lines of code in my tile algorithm so that they overlap and crop 15 pixels at each end. Veil, looks great. Took a couple of days and was rather annoying, but I think this is a good option for people who need very large tiled backgrounds on the iPhone.

+4
source

My best advice, but not what you asked, to know when PVRTC is not suitable. The simplest solution is simply not to use PVRTC for these plates. I spent a lot of time trying to bend PVRTC to work in situations for which it simply is not suitable.

Nonetheless,

When using PVRTC, a texture is always considered a tile (by itself), so the pixels on the right edge affect the pixels on the left edge (the same with the top and bottom). So, choosing 1 or 2 probably won't work.

One of the possibilities is to add an alpha channel to the tiles and allow them to disappear at the edges so that when they overlap, they disappear with each other. Remember that PVRTC tends to work better with gradual alpha fading. Hard alpha faces often have artifacts in PVRTC.

+1
source

All Articles