EACam
Warrior
154 Posts |
Posted - Apr 26 2004 : 11:40:45 AM
|
I know I've heard of this problem from others:
When i draw a texture, SOMETIMES a row or column (or both) of pixels from one side will be drawn on the opposite side. It just looks kind of funky and dumb. I've tried subtracting 1 from the width and height when I use those values, but it still doesn't work.
Any experience with this before? |
|
Spodi
Warrior
USA
142 Posts |
Posted - Apr 26 2004 : 5:42:40 PM
|
Are you sure your textures are a power of 2? So 2, 4, 8, 16, 32, 64, 128, 256... etc (shouldn't go higher then 516 though).
|
vbGORE |
|
|
VBBR
Moderator
Brazil
617 Posts |
Posted - Apr 26 2004 : 6:36:33 PM
|
Are you sure your textures are square? So 2x2, 4x4, 8x8, 16x16, 32x32, 64x64, 128x128, 256x256... etc (shouldn't go higher then 512x512 though). Some cards have problems with non-square textures.
NOTE: This message is COMPLETELY original and I haven't got its idea from ANYWHERE else. (but note Spodi, it's 512 and not 516) |
Whatever. Who knows... |
Edited by - VBBR on Apr 26 2004 6:37:29 PM |
|
|
Peter
Administrator
Canada
67 Posts |
Posted - Apr 26 2004 : 8:05:33 PM
|
Hmm, I doubt that it not being a power of 2 texture size would cause that sort of problem. What would happen then is the texture would look stretched or warped.
Most likely its a problem with calculating your texture coordinates. Remember that they from a scale of 0.0-1.0. |
Talos Studios - VoodooVB - VB Gamer
|
|
|
EACam
Warrior
154 Posts |
Posted - Apr 26 2004 : 8:40:43 PM
|
That's most likely it peter, but I half copied that code . It looks quite messy (as in, complicated, not badly written). I fiddle arround with it and see what i can come up with. NOTE: it only happens SOMETIMES.
Oh and my tiles are all 32x32 and even if they weren't my hardware supports rectangular textures |
|
|
Spodi
Warrior
USA
142 Posts |
Posted - Apr 26 2004 : 9:36:02 PM
|
Well the thing with textures not by powers of two is that it draws and all, but it just looks uglified. But yeah, sounds like you might have a problem with your TU/TV values, you stretched the graphics since your screen is an odd size, or maybe you have that anti-aliasing thingy on (thingy with Linear and such) - I know it messes up on my comp, maybe not yours though. |
vbGORE |
|
|
EACam
Warrior
154 Posts |
Posted - Apr 27 2004 : 09:39:30 AM
|
Yup, you're right...it's that stupid Linear filter. It was causing that problem so I tried to fix it by subtracting 1 from the height and width of the actual size of the texture. Then I switched it back to Point filtering and I had this nasty row of misplaced pixels...fixed tho.
Thanks.
|
|
|
game_maker
Knave
Saudi Arabia
83 Posts |
Posted - Apr 27 2004 : 4:08:25 PM
|
I do exacly the same that "EACam" do ....
its not a only happening in 2d ,,, for example if you are making a skybox don't use filters it will show lines at the edges !!! you can change your images in 2D Sprites but sometimes you can't do anything (I think) so you must to be carefull to choose you filters
|
|
|