Results 1 to 5 of 5

Thread: Viewport stretching in DX8

  1. #1

    Thread Starter
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Viewport stretching in DX8

    Hello everyone,

    I'm working on a retro-style RPG that runs in resolution 320x240 (windowed). Since this would be too small to play I'm rendering the scene into a 640x480 sized PictureBox. The problem is that DirectX automatically applies some smoothing filter and the whole picture looks unsharp (see attachment). How can I turn this off?

    Next step would be to apply a SAL filter or something, is there a dll I can easily use?

    Thanks,

    Fox
    Attached Images Attached Images  

  2. #2

    Thread Starter
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Re: Viewport stretching in DX8

    No one ever stumbled into this? There must be a way to deactivate that "feature"...

  3. #3
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Viewport stretching in DX8

    So, you're looking for a quick way to sharpen it? Since its directX, I'm not too familiar with how you would do it that way, but you could use GetDIBits/SetDIBits to apply a sharpen filter? Would that be adequate? Not too sure how fast it would be on a picturebox that size...probably not fast enough for a game..

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  4. #4

    Thread Starter
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Re: Viewport stretching in DX8

    Not exactly, basically I want to prevent the filtering (smoothing).

    And after that, yes, I want to apply my own filter. But this will only work on squared pixels, not on the yet blurred output.

  5. #5

    Thread Starter
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Re: Viewport stretching in DX8

    Yet the only way I found to avoid the stretching is:

    - setup the buffer in correct size
    - still do the rendering for 320x240
    - multiply each coordinate by 2

    The result is about 20% slower than DX's auto-strech-smooth but at least it's working.. if anyone finds a better way please let me know!

    Fox
    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width