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

As of 4.26 you can do this with.

    FString DefaultGraphicsRHI;
    	if (GConfig->GetString(TEXT("/Script/WindowsTargetPlatform.WindowsTargetSettings"), TEXT("DefaultGraphicsRHI"), DefaultGraphicsRHI, GEngineIni))
    	{
    		FString NAME_DX11(TEXT("DefaultGraphicsRHI_DX11"));
    		FString NAME_DX12(TEXT("DefaultGraphicsRHI_DX12"));
    		GConfig->SetString(TEXT("/Script/WindowsTargetPlatform.WindowsTargetSettings"), TEXT("DefaultGraphicsRHI"), (useDx11? *NAME_DX11 : *NAME_DX12),GEngineIni);
    		GConfig->Flush(true, GEngineIni);

    	}

Exchange the “NAME_DX11” for the RHI your wanting if not dx11 or 12.
This obviously requires a restart to change

4 Likes