Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 glitches in dx8 textures
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

EACam
Warrior

154 Posts

Posted - Apr 26 2004 :  11:40:45 AM  Show Profile  Reply with Quote
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  Show Profile  Visit Spodi's Homepage  Send Spodi an AOL message  Click to see Spodi's MSN Messenger address  Send Spodi a Yahoo! Message  Reply with Quote
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
Go to Top of Page

VBBR
Moderator

Brazil
617 Posts

Posted - Apr 26 2004 :  6:36:33 PM  Show Profile  Reply with Quote
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
Go to Top of Page

Peter
Administrator

Canada
67 Posts

Posted - Apr 26 2004 :  8:05:33 PM  Show Profile  Visit Peter's Homepage  Reply with Quote
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

Go to Top of Page

EACam
Warrior

154 Posts

Posted - Apr 26 2004 :  8:40:43 PM  Show Profile  Reply with Quote
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
Go to Top of Page

Spodi
Warrior

USA
142 Posts

Posted - Apr 26 2004 :  9:36:02 PM  Show Profile  Visit Spodi's Homepage  Send Spodi an AOL message  Click to see Spodi's MSN Messenger address  Send Spodi a Yahoo! Message  Reply with Quote
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
Go to Top of Page

EACam
Warrior

154 Posts

Posted - Apr 27 2004 :  09:39:30 AM  Show Profile  Reply with Quote
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.

Go to Top of Page

game_maker
Knave

Saudi Arabia
83 Posts

Posted - Apr 27 2004 :  4:08:25 PM  Show Profile  Visit game_maker's Homepage  Reply with Quote
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

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.11 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.