On Wednesday, 26 September 2007 at  8:45, Per Inge Mathisen wrote:
> On 9/26/07, Christian Ohm <[EMAIL PROTECTED]> wrote:
> > So what's the reason for not using GL_CLAMP_TO_EDGE?
> We do...

Oh, right, trunk does for the terrain textures. I thought I had updated
my copy before grepping... Any reason why it isn't used everywhere
instead of GL_CLAMP? Not that it'd help much, since with texture pages
most texture edges aren't on the edge of the image.

> > As far as I can see the trunk doesn't use blending on the terrain, but
> > why have several people said they still have texture seams using it?
> 
> I think this is because their OpenGL drivers are overriding blending
> parameters, or they are looking at tiles that simply do not tile well
> in any version. (The "mud" tiles in tertilesc1 simply do not tile
> well, for example.)

Ah, driver settings overriding the application. Always great.

> > And how does Warzone handle the tiles internally?
> 
> The textures are stitched together into texture atlas pages for faster
> access (less rebinding).

So, if the texture pages are generated on runtime, what about adding a
one pixel border to every tile (just replicate the outermost pixel row)?
That'd need a bit more texture memory (since you can fit one row and
column of tiles less into the texture), and a bit more complicated
calculation of texture coordinates, but that way the border pixels stay
the same colour even when blending. (I think kage suggested something
similar in his forum post.)

> > the black borders should only appear on those tiles
> > at the border of the image (which might be the reason they are not more
> > apparent).
> 
> No, that has little to do with it. Seams appear whenever the outermost
> pixels of a tile do not match the pixels in the neighbouring tile, and
> that happens whenever filtering on the outermost pixels is done, since
> it cannot know how to change these pixels without making them no
> longer match the pixels they should tile against.

That was more or less what I meant - not every texture has a black
border, since some are next to another texture that doesn't contrast
much to it. If every tile was a separate texture, every tile had a black
border (with GL_CLAMP, and GL_CLAMP_TO_EDGE would solve the problem).

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to