Currently i’m rendering my lightmaps with GL_TEXTURE_WRAP_S & T parameters set to GL_CLAMP, and GL_TEXTURE_MIN/MAG_FILTER set to GL_LINEAR . My lightmaps have (black) seems on the edge of the polygons. (I figured out this must be due to the linear filtering because when i render the scene with GL_NEAREST filtering , the seems are gone.) Who do i get rid of these seems using linear filtering? (I heard something about using a border… How does this work?)
Also, when i run the program on a geforce 2MX (my friends), there are NO seems at all. (i tried nearest to trilinear filtering).
Normal GL_CLAMP samples from the border color, which is black by default.
There is an extension called GL_CLAMP_TO_EDGE. You want to use that. It doesn’t sample from the border. Because the majority of the time, developers who use GL_CLAMP, actualy want the functionality of GL_CLAMP_TO_EDGE, GeForce drivers, actually implement GL_CLAMP as CLAMP_TO_EDGE, thats why you dont get the black lines on the GeForce card.
I think the GF3 however does GL_CLAMP correctly. IIRC anyway.
Yep, you’re right. I was wondering why I got black lines on my dynamic cubemapping demo. I wasn’t setting the addressing parameters at all, so it defaults to wrap I believe. Using GL_CLAMP, gives the same result as GL_CLAMP_TO_EDGE on my GF4.