Luke on Early Progress Erik Bročko on Reintroduction of direct light… Akos on Updated Demo executable acterhd on Updated Demo executable ajmiles85 on Updated Demo executable
As was kindly pointed out to me by Johan on Twitter, the old demo from the middle of last year crashes on startup on some cards.
It looks like on newer D3D12 runtimes it was removing the device for bad behaviour on my part that the validation layer now picks up on. I don’t think it would ever have worked on cards with Tiled Resources Tier 1 support only.
This isn’t the newer/faster version in the video today, but it should be a working version of what used to work on older versions of Windows 10!
Volume Tiled Resources are still required for the Terrain3K/4K, so that rules out all AMD cards right now. I’ve also included Terrain1K in the zip this time.
EDIT: I’ve also removed the tall yellow flowers since this version has rather amateurish texture coordinate derivative calculations that were leading to the edges of those blocks looking rather aliasy.
Spent a fair bit of time rewriting this again, this time paying even closer attention to performance than before.
Performance in a typical elevated scene at 1080p has come down from 14ms to around 7ms.
For anyone that might have tried the demo below but got a crash (probably due to Out Of Memory), here’s a link to a smaller “1K” level that should drop in to the directory alongside 2K/3K/4K. Just update the batch files included to load 1K instead:
Update: The original zip file now includes Terrain 1K.
I figured it’s about time I get a binary version out there for people to run and tell me how quickly it does or doesn’t crash on their machines.
The DirectX 12 version doesn’t have many of the graphical features seen in other videos on this blog, but once I’m content that this version runs fine I’ll start bringing forward things like lighting, water reflections, global illumination, shadows, mouse controls etc.
What this version does have is the DX12 Multi-GPU support previously shown, as well as the ability to run in single or dual GPU mode if you don’t have two capable cards.
Included are 4 different sizes of world, aptly called “Terrain1K”, “Terrain2K”, “Terrain3K” and “Terrain4K”, which are 1024,2048, 3072 and 4096 blocks in width/depth respectively. When viewed from the middle of the map this is equivalent to a Minecraft draw distance of 64, 128, 192 and 256 chunks.
- Download the zip file from OneDrive.
- Extract zip file.
- Run “Run_1080p_SingleGPU_VSync.cmd” (or any other batch file included).
Keep an eye on the command window that opens for information about what GPUs it has enumerated, what features they support and any errors that might be produced.
Keyboard – WSAD + Arrow Keys + Shift to fly fast.
Xbox 360 / Xbox One Controller: Sticks + Triggers + A to fly fast. No deadzones yet, sorry!
Mouse not yet supported.
Now for the more detailed README!
- The download is a zip file with a .exe in it.
- Browsers that scan zip files for exes are likely to try stop you from downloading and running it. If you don’t trust the exe in there then don’t run it! In reality that worst that might happen is that it crashes the app or maybe causes the graphics driver to reset and restart.
- There’s 4 batch files in there named similarly to “Run_1080p_SingleGPU.cmd”. Pick the variation you want to run or create your own batch file to be able to change whether it runs in single/multi GPU mode, what GPU it runs on, what resolution it runs at, whether VSync is on and which level it loads. Run “MineRay.exe” without arguments to see what the arguments are.
- Windowed mode only for now I’m afraid.
- Despite the frame rate being uncapped without VSync, it feels rather choppy, I’ll look into it. Probably best to run with VSync on unless you’re trying to stress the GPUs.
- Terrain1K/Terrain2K should load on almost every GPU that supports DX12
- Terrain3K and Terrain4K require 3D/Volume Tiled Resources. This effectively limits them to Nvidia 900 series cards, they won’t run on AMD or Intel GPUs for now.
- The window title bar shows you what GPU(s) it’s running on and the frame rate / frame time.
- The little red/green/blue bar at the top shows you what proportion of the screen is rendered by which card. The bar on the left is taller only so that you can see where the split is if both sides of the bar are the same colour. (Green for Nvidia, Red for AMD, Blue for Intel, Yellow for Other).
- For now, the only world I’m providing is JakBB’s Plumoun, but if there’s interest I’ll try and get the tool I use to convert Minecraft save games into .mcbin files out there sometime soon. This is my own file format, so you won’t find it documented.
- I’ve had one report from a system with SLI’ed GTX 980 cards that they see very little speedup due to one card doing almost all the work, I’ve not had any luck figuring that out yet.
- The fact that 2 identical cards don’t provide exactly a 2x speedup is my own fault, not DirectX 12’s, I’ll improve this more as time goes on.
- There will be a vertical shear visible until I make a fix to the inter-GPU synchronisation, I’ll fix it in due course.
For any feedback, either register here and leave a comment, figure out my email address on the About page or tweet me @adamjmiles. I’ll update the ‘readme’ above with anything further I can think of.
Using DirectX 12’s Multi-GPU API the screenshot below shows a GTX 970 and Radeon 390X working together to render a single frame. The coloured bar at the bottom of the image highlights where on the image the split lies between which card does what. In the scene below the GTX 970 was taking on approximately 60% of the image and the 390X around 40%.
This split is dynamic and responds to whichever GPU is taking the longest to render it’s part of the image. While the 390X generally performs better than the GTX 970, in the scene below the 970 in green has a substantial part of its ‘half’ missing the world and so these pixels take a lot less time. To compensate, the split moves right to encompass more of the image and ensure that each GPU is spending the same amount of time rendering its part of the image.
The world now takes advantage of 2D Tiled Resources on both cards and Volume (3D) Tiled Resources on the GTX 970 to reduce the memory used by between 50 and 90%.
Using both cards to render the scene in tandem results in frame rates of over 400 frames per second (~2.5ms per frame) at 1920×1080.
Porting of features such as water reflections, global illumination and correct mip mapping from the D3D11 version are still in progress.