seams in cubemap texture?


I’m using a cubemap for reflections and recycling it for use as a skybox. I draw a screen-aligned quad with the appropriate (camera-dependent) texture coords and it renders my skybox nicely… except that there are seams in it along the joints between each cube face.

I also get the same seams in my reflections using the same cubemap. The seams are 1 fragment wide, regardless of the screen or cubemap res, so I’m sure I haven’t broken my textures.

What am I doing wrong? Clamp/wrap?

I’m running an ATI 9600Pro in linux, fglrx 8.19.10 if that makes any difference. I can post a screengrab tonight if people want.

Play with the wrap modes. I’ve found GL_CLAMP_TO_EDGE works quite nicely with cubemaps. :slight_smile:

Edge clamping can help by shrinking the texture sampling rect by 1/2 texel in all directions, so that when two faces of a cube meet at an edge, they’ll each contribute 1/2 to a shared texel rather than duplicate a common border.

works beautifully, thanks!


GL_CLAMP_TO_EDGE is not bad but still not perfect.

C’mmon, go for the Right Stuff and use texture borders, the only perfect solution.