Concept: Switch MP2 to D3D11/D2D rendering (1 Viewer)

riggnix

Portal Pro
September 8, 2009
95
25
Home Country
Austria Austria
Would you consider to implement this in an interchangeable way?

I think it would be great if the DX part would be its own plugin. That way we could have a fancy DX11 plugin and a DX9 plugin for compatibility with older hardware.

Also, this would be a great step towards platform independence. The biggest part of MP2 not working with Mono on e.g. Linux has to be DirectX/DirectShow (correct me if I'm wrong). If there is an interface to switch the renderer it would be much easier to write a openGL/gStreamer plugin.

Since you're working on this piece of code anyway, how much extra work do you think it would be to make it interchangeable? Would it be worth the effort?
Just curious about your opinion.
 

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #22
    I think it would be great if the DX part would be its own plugin. That way we could have a fancy DX11 plugin and a DX9 plugin for compatibility with older hardware.
    This is in principle already the case: the SkinEngine itself is a plugin and can be exchanged. The device creation and rendering related code is in few classes only. So if someone wants to port this on OpenGL, it could be possible. Of course also the VideoPlayer, ImagePlayer and all other parts which depends on DX(9) and DirectShow need to be adopted as well.
    Althought this might be theoretical possible, it won't be coded by me/us.

    The DX9 compatibility is still given with DX11: it's just a newer API that is able to create a device with feature level of 9.x. For that part I created the test binary, it worked also on older cards.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #23
    I could fix some things, to the result is quite good already:
    • React on screen/window size changes
    • Fixed scaling when size changes (Visual, Brushes and Text)
    Good that we have the GUI-Test plugin. It's very useful to compare rendering results.

    Few screenshots:
    20141223_D2D7.png 20141223_D2D8.png 20141223_D2D9.png 20141223_D2D10.png

    What needs to be implemented:
    • Opacity masks
    • Proper text layouting,
    • Add support for loading fonts from file
    • Extend font desciption (FontWeight, Style,...)
    • Proper handling of ScrollContent presenter (currently overpaints the outside)
    • Differences in shape sizes (see treeview + / - )
    • Image based resource (Textures, ImageBrush,...)
    • VideoPlayer interface (D3D9 interop for video frames)
    • Effects (after all exisitng stuff is working again!)
    List is long, but clear :)
     
    Last edited:

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #25
    I wish you all a happy new year!

    And what could be better than a first testbuild that uses DX11 + Direct2D rendering? The first post of this thread got updated with an archive to download. Extract it to any location (but not overwriting an existing installation, use another, empty folder!)

    Because I rewrote many parts of MP2 skin engine, there will probably some things missing or broken. Rendering results might look different compared to original DX9 based version.

    If you find such differences, no matter how small they are, please post them here so we can fix it!

    Although D2D effects are still missing, the rendering quality and performance improved by the rework a lot. So give it a try :)
     

    osre

    Retired Team Member
  • Premium Supporter
  • December 14, 2014
    775
    387
    Home Country
    Germany Germany
    I've downloaded it and gave it a quick try.
    Works smooth and clean so far. Rendering looks way better now, now more "black shadows" around curved shapes.
    Even antialiasing, which prevented screen from updating when turned on in last Weekly works now.
    I saw one issue in some GUI tests, that is at least not in "dev". The captions on some tests like "Opacity" and "tree view" are cut off/blends out at about 2/3 of my screen width (1080p). See attached screenshot.
     

    Attachments

    • MP2-D2D-cutoff-text.PNG
      MP2-D2D-cutoff-text.PNG
      963.8 KB

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #28
    I've downloaded it and gave it a quick try.
    Works smooth and clean so far. Rendering looks way better now, now more "black shadows" around curved shapes.
    Even antialiasing, which prevented screen from updating when turned on in last Weekly works now.
    I saw one issue in some GUI tests, that is at least not in "dev". The captions on some tests like "Opacity" and "tree view" are cut off/blends out at about 2/3 of my screen width (1080p). See attached screenshot.
    Thanks! Such rendering issues we need to find and fix. It's caused by render transforms and different skin / window sizes. It's quite tricky to do this right.
     

    osre

    Retired Team Member
  • Premium Supporter
  • December 14, 2014
    775
    387
    Home Country
    Germany Germany
    Thanks! Such rendering issues we need to find and fix. It's caused by render transforms and different skin / window sizes. It's quite tricky to do this right.
    It's Titan skin.
     

    Users who are viewing this thread


    Write your reply...
    Top Bottom