Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to toggle between DX10, DX11, DX12 and Vulkan via Blueprint?

Hey guys, any idea how to toggle between Dx11, DX12 and DX10, and maybe Vulkan? via Blueprint

alt text

Product Version: UE 4.17
medium-1.jpg (274.1 kB)
more ▼

asked Oct 31 '17 at 12:27 AM in Rendering

avatar image

6 1 2 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

To understand how to do it you need to understand how renderer is structured. UE4 for sake of code compatibility has common rendering interface Rendering Hardware Interface (RHI) for graphical libraries, similar concept to OnlineSubsystems if you seen that. Each library has it's own RHI implmentation, in Windows you have D3D11 D3D12, OpenGL and Vulcan.

Now switch between them on runtime is kind of imposssible as if you look in this code:


RHI is decided on start up and thats it. But as you can see in there you can override RHI used by adding command line options on start up of your game

-d3d12, -d3d11, -d3d10, -vulkan, -opengl, -opengl3, -opengl4

So easiest way is to just create BAT files to run specific option and make user run proper one. You could technically make game run another instance of it self and then exit, so new instance of the game runs in selected RHI, but problem here is how to save this option, you would need to make some external aplication that would manage that.

Either way your options are quite limited in blueprints because by defaut (or else you get some plugin that can do so) you can exec external applications via blueprints to even do this engine restart trick. So your best bet is BATs or maybe make a game launcher which will run game with proper option, you can use anything here. Maybe submit feature request in feedback forum to have even ability to include preferable RHI options in config, then you would just need to do console command, as it really seems like a missing option to have.

Also impotent thing whatever you do, in order for RHI code modules to be included in your package game and even have a option to run game on specific one you need to mark them as targeted RHIs. To do so go to Project Settings-> Platfrom->Windows and there you will have a list of avable RHI which you want to be packaged with the game.

Also note that command line options work in editor too, you can start up editor in any RHI avable for Windows

more ▼

answered Oct 31 '17 at 01:29 AM

avatar image

36.7k 932 169 1111

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question