Skybox Edge Artifact w/Radeon

I just bought a Radeon 9800 Pro 128 and have been running some demo apps compiled previously and run on a GeForce3 Ti500 without a problem. On the Radeon I get an artifact where the edges are highlighted in black such as in this picture. Anyone have a clue as to why I see this on the Radeon and not on the GeForce?

That seams like you use GL_CLAMP, instead of GL_CLAMP_TO_EDGE… the nvidia drivers (wrongly) force GL_CLAMP to act as GL_CLAMP_TO_EDGE if you dont disable that in the drivers

Excellent, that was it precisely. Thanks for the good input … Till now, I have been developing on nVidia cards exclusively for a long time … I had no clue that the nVidia drivers were in error.

this did the trick …

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Set the texture objects and apply the necessary properties to each (order
// is Top, Bottom, Right, Left, Front, Back

void MgSkyBox::setTextures(size_t textureIndices[6])
{
memcpy(m_Textures,textureIndices,sizeof(size_t)*6);

// Detect the GL_EXT_texture_edge_clamp extension and use it if present
int clampMode;

if (IsOpenGlExtensionSupported(“GL_EXT_texture_edge_clamp”))
{
clampMode = GL_CLAMP_TO_EDGE;
}
else
{
clampMode = GL_CLAMP;
}
for (int i=0; i<6; ++i)
{
glBindTexture(GL_TEXTURE_2D,m_Textures[i]);
glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_REPLACE);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,clampMode);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,clampMode);
}
}

[This message has been edited by pleopard (edited 05-26-2003).]

Originally posted by Mazy:
…the nvidia drivers (wrongly) force GL_CLAMP to act as GL_CLAMP_TO_EDGE…

Have I got it right? This means that under NV GL_CLAMP has the same effect that GL_CLAMP_TO_EDGE?
Oh well, I don’t like this. How can I disable it in the driver (if possible)?

In the driver settings, under nvidia/opengl you find 2 checkboxes, one of them (you know when you see the name, i got localized so my text wont help you)

Its not really a bug (i dont want to backtalk nvidia here) it is really a feature, because mot of the time when a openglprogram uses GL_CLAMP they really wanted GL_CLAMP_TO_EDGE, but that was an extension and i guess many companies rather used the GL_CLAMP instead of checking and using the extension…

Whats bother me is the fact that it replaces the token by default… that should be changed.

edit : ops, in my 44.03 drivers its of by default, if it remembers my last settings or if they change it i dont know… but if its off by default i just say - god work, and keep it that way.

[This message has been edited by Mazy (edited 05-26-2003).]

Ahhh it is “Enable conformant OpenGL texture [clamp] behavior”

Thx!

[This message has been edited by pleopard (edited 05-26-2003).]

I don’t find the checkbox… No wait, maybe it’s this one (which, once traduced means a totally different thing from what you said - the worse translation ever).

Oh well, I must say that even if I don’t like it, it is a nice idea, especially for beginners.

EDIT: thank you!

[This message has been edited by Obli (edited 05-27-2003).]

So you are trying to find the checkbox and at the same time typing this? Too bad this isnt a chat room

PS: I tried this a long time ago (I think on a GfMX) and the performance dropped like a rock. I’m not sure why. Maybe software mode is beeing used because the MX cant do GL_CLAMP? And it’s not fully software mode, because I think I would have gotten lower than 1FPS otherwise.

GeForce2 doesn’t support GL_CLAMP, so checking the check box reverts to software mode.

GeForce3 and up do support proper GL_CLAMP, but apparently enough applications relied on the old behavior that they found it best to make the default be to preserve the old, non-standard (but understandable) behavior.