Hello. If you’re into technical stuff, I highly recommend getting access to UE4 code. I’m a technical artist and normally don’t touch the code, but since I set up Visual Studio and configured it for our project, my life became SO much easier, especially when dealing with GameUserSettings stuff like HDR, Scalability etc. I must say some of this stuff is broken as far as I can tell (I submitted a few bugs), or sometimes it just doesn’t work as you think it would, so the ability to double click a native BP node and have it opened in VS is life-saving (or if this doesn’t work, you can always find it manually). So ask your programmers how to set this up (basically download free VS, configure it according to the UE doc, right click on your project file to create a Solution, oh, and your engine install should have the Editor Symbols For Debugging component enabled - you can change it in Epic Launcher), or if your project is not code-based, then maybe you could look the code up on GitHub, or just create an empty C++ project…
Anyway, this way I was able to find that the SupportsHDRDisplayOutput() function returns the GRHISupportsHDROutput variable value, which is set differently on different platforms, but for WindowsD3D12 it is set to whatever SupportsHDROutput() returns, which looks like this:
static bool SupportsHDROutput(FD3D12DynamicRHI* D3DRHI)
{
// Determines if any displays support HDR
check(D3DRHI && D3DRHI->GetNumAdapters() >= 1);
bool bSupportsHDROutput = false;
const int32 NumAdapters = D3DRHI->GetNumAdapters();
for (int32 AdapterIndex = 0; AdapterIndex < NumAdapters; ++AdapterIndex)
{
FD3D12Adapter& Adapter = D3DRHI->GetAdapter(AdapterIndex);
IDXGIAdapter* DXGIAdapter = Adapter.GetAdapter();
for (uint32 DisplayIndex = 0; true; ++DisplayIndex)
{
TRefCountPtr<IDXGIOutput> DXGIOutput;
if (S_OK != DXGIAdapter->EnumOutputs(DisplayIndex, DXGIOutput.GetInitReference()))
{
break;
}
TRefCountPtr<IDXGIOutput6> Output6;
if (SUCCEEDED(DXGIOutput->QueryInterface(IID_PPV_ARGS(Output6.GetInitReference()))))
{
DXGI_OUTPUT_DESC1 OutputDesc;
VERIFYD3D12RESULT(Output6->GetDesc1(&OutputDesc));
// Check for HDR support on the display.
const bool bDisplaySupportsHDROutput = (OutputDesc.ColorSpace == DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020);
if (bDisplaySupportsHDROutput)
{
UE_LOG(LogD3D12RHI, Log, TEXT("HDR output is supported on adapter %i, display %u:"), AdapterIndex, DisplayIndex);
UE_LOG(LogD3D12RHI, Log, TEXT(" MinLuminance = %f"), OutputDesc.MinLuminance);
UE_LOG(LogD3D12RHI, Log, TEXT(" MaxLuminance = %f"), OutputDesc.MaxLuminance);
UE_LOG(LogD3D12RHI, Log, TEXT(" MaxFullFrameLuminance = %f"), OutputDesc.MaxFullFrameLuminance);
bSupportsHDROutput = true;
}
}
}
}
return bSupportsHDROutput;
}
Also, when I was implementing this feature, only through code I found that r.AllowHDR needs to be set to 1 (e.g. in DefaultEngine.ini) for HDR to work. I really wish this stuff was better documented…