PDA

View Full Version : GL_CLAMP_TO_EDGE vs GL_SEAMLESS_CUBEMAP



debonair
03-25-2014, 11:32 PM
Can we say that output of GL_CLAMP_TO_EDGE and GL_SEAMLESS_CUBEMAP will be the same?
What is difference between two in cubemap textures?

mhagain
03-26-2014, 12:37 AM
They're not the same.

Consider a case where a cubemap is being sampled with a texcoord of 0.9999 and linear filtering is enabled. As we know, linear filtering will use a weighted average of adjacent texels to derive the final result.

With clamp-to-edge these adjacent texels will all come from the same cubemap face.

With seamless these adjacent texels may come from different cubemap faces.

Why this is important is that in certain cases a cubemap may have visible seams along the edges due to default clamping behaviour; e.g. if you examine the following image:

http://img179.imageshack.us/img179/6746/26617189.png

You'll see that towards the top-right there's a quite visible hairline "join" where two faces of the cubemap meet up. Seamless would get rid of this.

debonair
03-26-2014, 12:40 AM
Thanks a lot.!!