Jump to content
  • Advertisement
Sign in to follow this  
Landon_Fox

Newbie Direct3D 8.0 question. Expanded textures are pixelating.

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I'm making the transition from DirectDraw to Direct3d. I'm still learning so my knowledge is somewhat limited. I am using Direct3d 8.0 on SDK version 8.0. My game is going to be 2d, so I'm using pre-transformed vertices, the kind where you put in rhw with x, y, and z. I'm running into a problem when I try to draw a small texture onto a large area. Instead of anti-aliasing the image, it's just pixelating it! This does not please me. I know there must be a way to anti-alias the image because most of my commercial games do so. I've done some googling and article reading here on gamedev. The problem is that most of these articles involve math. I'm guessing that when pixel crunching starts, hardware acceleration stops. That doesn't please me either. Is there an easy, pre-packaged, vacuum-sealed solution? Did I miss a flag I was supposed to pass to someone or a render state I was supposed to set? Thanks for your time.

Share this post


Link to post
Share on other sites
Advertisement
Look into using Device->SetTextureStageState with D3DTSS_MAGFILTER and D3DTSS_MINFILTER.

Device->SetTextureStageState( 0, D3DTSS_MAGFILTER, D3DTEXF_LINEAR );
Device->SetTextureStageState( 0, D3DTSS_MINFILTER, D3DTEXF_LINEAR );

If you want more advanced filters than point, linear and triangler I think you'll have to do pixel crunching.

Also this isn't going to perform any miracles. You can't just make a 32x32 image, 256x256 and expect it to look great.

If you want whole-screen anti-aliasing you'll have to turn multi-sampling on when setting the device parameters. Although I've found this usually murders the performance.

Share this post


Link to post
Share on other sites
Thank you for the quick responce!

Linear will be just fine for my purposes. The small texture I'm blowing up is just a feint transparency I'm stretching over a tile-map to give it some more variation.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!