|glitches in dx8 textures|
|EACam||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||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).|
|VBBR||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)|
|Peter||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.|
|EACam||That's most likely it peter, but I half copied that code [:o]. 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||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.|
|EACam||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.
|game_maker||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 [;)]