I am having problems with textures. When I have more than one texture in an image, they get overlapped by the renderer. What I think is happening, is that the texture is getting aliased before being applied to the mesh causing nearby textures to bleed into each other.
Here is an example:
This image contains 2 textures.

Notice that the two faces do not overlap. I can draw a selection rectangle around either face without including any of the other.
Here is some test code
And this is the result. Notice the pixels pointed to by the yellow arrows.

At first, I thought maybe the uv offsets were off by one pixel. But if you change the cls color to a contrasting color, say 128,128,128, then you can plainly see that the textures line up with the edge of the graphics.
I have tried other textures as well. Some overlap so bad, that even if I use a 1 pixel border around each texture, there is still bleeding between them.
As I understand it, using a flag of 1 in the LoadTexture command should display the texture as-is, without any aliasing. But there seems to be aliasing done to the image anyway.
Here is an example:
This image contains 2 textures.

Notice that the two faces do not overlap. I can draw a selection rectangle around either face without including any of the other.
Here is some test code
SuperStrict Import sidesign.minib3d Graphics3D 800,600,32,2 ClearTextureFilters Local Texture:TTexture = LoadTexture("image3.png",1) Local mesh:TMesh = CreateMesh() Local surface:Tsurface = CreateSurface(Mesh) Local Vert1:Int, Vert2:Int, Vert3:Int, Vert4:Int 'Smiley face Vert1 = AddVertex(Surface,-1,1,0,0,0) VertexNormal(Surface,Vert1,0,0,-1) Vert2 = AddVertex(Surface,-.5,1,0,.5,0) VertexNormal(Surface,Vert2,0,0,-1) Vert3 = AddVertex(Surface,-1,0,0,0,1) VertexNormal(Surface,Vert3,0,0,-1) Vert4 = AddVertex(Surface,-.5,0,0,.5,1) VertexNormal(Surface,Vert4,0,0,-1) AddTriangle(Surface,Vert1,Vert2,Vert4) AddTriangle(Surface,Vert1,Vert4,Vert3) 'frowny face Vert1 = AddVertex(Surface,.5,1,0,.5,0) VertexNormal(Surface,Vert1,0,0,-1) Vert2 = AddVertex(Surface,1,1,0,1,0) VertexNormal(Surface,Vert2,0,0,-1) Vert3 = AddVertex(Surface,.5,0,0,.5,1) VertexNormal(Surface,Vert3,0,0,-1) Vert4 = AddVertex(Surface,1,0,0,1,1) VertexNormal(Surface,Vert4,0,0,-1) AddTriangle(Surface,Vert1,Vert2,Vert4) AddTriangle(Surface,Vert1,Vert4,Vert3) EntityTexture mesh,Texture Local Camera:TCamera = CreateCamera() PositionEntity Camera,0,.5,-1 Local Light:TLight = CreateLight() CameraClsColor camera,0,0,0 'change to 128,128,128 to see texture border While Not KeyHit(KEY_ESCAPE) Cls RenderWorld Flip Wend
And this is the result. Notice the pixels pointed to by the yellow arrows.

At first, I thought maybe the uv offsets were off by one pixel. But if you change the cls color to a contrasting color, say 128,128,128, then you can plainly see that the textures line up with the edge of the graphics.
I have tried other textures as well. Some overlap so bad, that even if I use a 1 pixel border around each texture, there is still bleeding between them.
As I understand it, using a flag of 1 in the LoadTexture command should display the texture as-is, without any aliasing. But there seems to be aliasing done to the image anyway.