#### Archived

This topic is now archived and is closed to further replies.

# Isometric tiles that wont fit correctly

This topic is 5465 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I am developing an isometric engine using d3d for 2d graphics. Now what I dont want to do is conform to making a diamond shaped quad and tiling that way... what I am attempting is tiling by having a normal rectangle quad with an iso tile on it. Now this is all fine and dandy but my textures have this blur (i think) to it I think it has something to do with stretching it or something. Either way it reaks havoc by making the borders visible inbetween tiles. Is there any kind of setting I should have on/off? Response is appreciated, if you have any questions about it please ask... ***KooK Commander*** [edited by - thek00k on November 6, 2003 11:29:49 PM]

##### Share on other sites
One of the tricky things about textures is that directx uses the center of the pixel. If you see the texture as being composed of square blocks, the edge (0,0) is also the edge of a pixel and not the center of the first pixel.
For a 128x128 texture, the center of the first pixel is (1/128,1/128)
A 4x4 texture has the pixel centers at 1/8, 3/8, 5/8 and 7/8.
If your texture should map properly onto a square they should vary between 0 and 1 for U/V.
Then the left top point of this texture is at -1/8,-1/8 and the right bottom point is (1 1/8,1 1/8)

If you map a 128x128 texture onto something, eg. a square, the top left corner has u,v coordinates (-1/128,-1/128). The bottom right has u,v as (1 + (1/128), 1 + (1/128)).
If you just use (0,0) to (1,1) you get a 1/2 pixel wide border between adjacent textures.

1. 1
Rutin
46
2. 2
3. 3
4. 4
5. 5
JoeJ
19

• 11
• 14
• 9
• 10
• 12
• ### Forum Statistics

• Total Topics
633003
• Total Posts
3009830
• ### Who's Online (See full list)

There are no registered users currently online

×