The Matrix Online Server Emulator
RD3D Renderer Wrapper - Printable Version

+- The Matrix Online Server Emulator (//
+-- Forum: General (//
+--- Forum: News & Announcements (//
+--- Thread: RD3D Renderer Wrapper (/showthread.php?tid=903)

RD3D Renderer Wrapper - rajkosto - 07-01-2012

So around the 25th I was taking screenshots of heads, torsos and other things to make note of what the faces/etc look like, but what was bothering me was the ugly, ugly "face shading" bug that has been with us since the release of Vista. So I decided to take matters into my own hands and eliminate it, once and for all.

From now on, if you use any of the launchers I have created, your MXO will automatically be patched to include my renderer wrapper, which will act as a translator between MXO and the Direct3D9 runtime, eliminating those outdated FFP rendering cals and replacing them with new, on the fly generated vertex-shaders, which is how all current games do animation and lighting nowadays.

Since I have invested a lot of time into this renderer (nearly all my waking hours since 25th dec untill now), it is accurate, and all effects and states that MXO uses should render 100% like they used to, only now there will be no bugs like infinite texture coords when using shadows, "one color" screens when there's too many environment-mapped objects on the screen (like around the Uriah HW), and all models, regardless of their skinning method, will be lit uniformly, so there will be no more "shading bugs".

The one downside of having to emulate the whole vertex FFP from D3D9 is that it makes a lot of shader combinations, and since they are generated on the fly, the first time MXO renders something, you will notice intermitted second (or longer, depending on how many new shaders are being generated) stutters during playing. This will only happen untill all of the shaders have been generated and stored, and after that, the game should play smooth.

However, since modern graphics cards weren't designed to switch vertex shaders every 5 draw calls or so, there's a significant performance decrease during normal play as well, in the form of lower FPS. However, since most of us have rigs that can play MXO at 200 FPS or more, this should not be a significant problem (the FPS is about 25% lower, but the performance difference is smaller if there are many models on screen, as VS does skinning all in hardware, while the old method did it in software, so with like 20 NPCs on screen, the performance hit is only 12%). The game is still perfectly playable even on my laptop, at maximum settings, on which i have developed the renderer.

If you have a very old card (like one that doesn't support Shader Model 2), this renderer will not even activate, and MXO will render as it always has, using FFP. People with such cards cannot use the Vista driver model and up drivers anyway, and shouldn't have the bugs in the first place.

However, if you have a more recent card, but very low power, and the FPS hit is just too much for you, you may opt-out of using this new renderer by making a new text document called rd3d_disable.txt (contents of this file are not important) and placing it in the same directory that MXO is installed in (next to rd3d9.dll). This will make the new renderer not activate at all, and MXO will work just as before.

I plan on continuously updating this piece of software, adding new features such as enabling AA while windowed, better overbrights and shadows, possible SSAO inclusion, etc. when I get some free time after the exams.

Hope you enjoy this, and happy holidays (in my country, Christmas came just today)

Discussion and troubleshooting at

[Image:] [Image:]

RE: A small christmas present - rajkosto - 06-10-2012


Code: (9.6.2013)
    MxO screenshot function should now work properly in all cases (bmp/jpg, windowed or fullscreen, AA or no) (9.5.2013)
    Add 34 more shaders
    Fix stippling artifact on alpha-blended surfaces on ATI cards when ATOC is enabled (8.4.2013)
    Add 64 more shaders, bringing the total count so far to slightly less than 500 (16.1.2013)
    Add 26 more shaders
    Increase maximum bone index from 20 to 40 to allow some NPC animations to play properly (13.1.2013)
    Enable windowed AA and ATOC even if the machine isn't capable of running the FFP->VS converter (13.1.2013)
    Add 94 more precompiled shaders
    Fix vertex/pixel shader profile detection on older graphics cards
    Fix small bug in shader generation that made the client crash on one particular shader (3.1.2013)
    Add functionality of uploading to a web service that will automatically receive newly-discovered requests for inclusion in future versions
    Add 2 more precompiled shaders (2.1.2013)
    Optimize rendering and shaders, add precompiled shader bundle to remove stutters (6.10.2012)
    Fix MXO problem where Anti Aliasing is forced-off when windowed.
    Add ATOC (Alpha to Coverage) support for much better looking trees and railings when AA is on.
    Fix missing world on ATI cards
    Initial Release

All updates are pushed automatically, as usual.