User Tag List

Results 1 to 10 of 10

Thread: [BUG] Pixel perfect scaling does not work in DirectX 9

  1. #1
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry [BUG] Pixel perfect scaling does not work in DirectX 9

    I've recently discovered that the scaling behaviour for the DirectX 9 Runtime doesn't work the same way as the DirectX 8 Runtime.

    I'm trying to upscale a 640x360, three times, to a resolution of 1920x1080. As you can see in the following images, the DirectX 9 Runtime stretches the pixels unnecessarily, where as the DirectX 8 Runtime behaves as expected.

    DirectX 9 (incorrect behaviour):
    http://i.imgur.com/69bv9v4.png

    DirectX 8 (correct behaviour):
    http://i.imgur.com/TvCMOmv.png

    I used the ultimate fullscreen object to do this upscaling, but the same effect is seen using the Windows object and manual upscaling.

    Please fix this as soon as possible, because it looks terrible!

    edit: I also can't use DirectX 8 as a workaround, because I need DirectX 9 shader support

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,087
    Mentioned
    123 Post(s)
    Tagged
    2 Thread(s)
    Hi,

    Could you send me a simple MFA so that I quickly see how you get this effect?

    Thanks,

    Yves.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's an example file which is using DirectX 9:

    directx89stretch.mfa

    My monitor is 1920x1080, so if you have the same resolution, you should see the same banding issue as in my first screenshot. If you have another screen resolution, set the original window size to a multiple of that (e.g. 1/2 of it, or 1/3rd of it).

    When you change the runtime from DirectX 9 to DirectX 8 you should see that it corrects the scaling.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Have you tried enabling smooth resizing?

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by happygreenfrog View Post
    Have you tried enabling smooth resizing?
    My game uses pixel perfect scaling, so it's very important to have no anti-aliasing for resizing.

  6. #6
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)
    ASD's Avatar
    Join Date
    Feb 2007
    Location
    Japan
    Posts
    1,764
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Try update your GPU driver and modify the texture filtering settings.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fanotherpg's Avatar
    Join Date
    Jul 2006
    Location
    High Wycombe, Buckinghamshire, UK
    Posts
    3,665
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can confirm both.
    On my Tower and ATI graphics all runtimes (Standard, DirectX, DirectX+VRAM, DirectX8, DirectX9) are resizing correctly.

    On my laptops Intel graphics however (also full HD resolution) none of them resizes correctly.

    However I found totally different bug:

    When I select any of applications to run as DirectX or DirectX +VRAM and compile them via F8, when I will close them with Alt-F4 MMF2 stays blocked like they still would be running and I need to close it by Task manager.

  8. #8
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,087
    Mentioned
    123 Post(s)
    Tagged
    2 Thread(s)
    Can't reproduce this issue on my main machine (I didn't check with the others yet).

    But just a comment, never use a 4x2 texture in a D3D game, D3D doesn't like this at all. Use a 16x8 or 32x16 texture at least (or even 64x32). That will be faster.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ASD View Post
    Try update your GPU driver and modify the texture filtering settings.
    I second this. You should probably try updating your GPU driver and seeing what your texture filtering settings are set to. Also, it might just be your GPU, meaning there is nothing you can do without enabling anti-aliasing while resizing.

  10. #10
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the feedback guys. I tried modifying my GPU texture settings to no avail. I still get the banding, but hopefully it's not an issue for many people. I'll try updating my graphics drivers to the latest as well. I have a GTX 560ti on this machine.

    What's interesting to note is that MMF2 (the editor) was actually lagging horribly with that 4x2 texture, and when I changed it to 64x64 it was completely fine. I should look into that for my main game, as I also have textures such as 1x1 pixel lying around too.

Similar Threads

  1. How to avoid pixel tearing(?) when scaling?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 21st May 2013, 01:51 PM
  2. Perfect 360 degree shooting AND perfect hit detection?
    By D_Light in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 9th May 2013, 04:30 AM
  3. HWA - Video doesn't work in full screen directx 9
    By Crian in forum Hardware Accelerated Runtime
    Replies: 5
    Last Post: 27th August 2010, 07:33 AM
  4. Does this only work with DirectX 9?
    By LB in forum Hardware Accelerated Runtime
    Replies: 3
    Last Post: 1st April 2010, 01:11 PM

Posting Permissions

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