Files
UnrealEngineUWP/Engine/Source/Runtime/RenderCore/Public/HDRHelper.h
benjamin rouveyrol 7a21ea463f hdr multi window/display support
This improves how the editor deals with displays that have different capabilities (some with HDR, others without).
Centralize where the CVars are accessed
Have the swapchain created in SDR when shown on a SDR display
Make sure color gamut matches the one supported by the platform/swapchain.
Allow Movie scene capture to override the gamut/output format to keep existing behaviour (MovieSceneCapture relies on swapchain data)

#preflight 628baef5183c1e13462a504d
#jira UE-150952
#rb luke.thatcher

[CL 20347067 by benjamin rouveyrol in ue5-main branch]
2022-05-24 09:04:39 -04:00

27 lines
971 B
C

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
RENDERCORE_API void HDRGetMetaData(EDisplayOutputFormat& OutDisplayOutputFormat, EDisplayColorGamut& OutDisplayColorGamut, bool& OutbHDRSupported,
const FVector2D& WindowTopLeft, const FVector2D& WindowBottomRight, void* OSWindow);
RENDERCORE_API void HDRConfigureCVars(bool bIsHDREnabled, uint32 DisplayNits, bool bFromGameSettings);
RENDERCORE_API EDisplayOutputFormat HDRGetDefaultDisplayOutputFormat();
RENDERCORE_API EDisplayColorGamut HDRGetDefaultDisplayColorGamut();
RENDERCORE_API void HDRAddCustomMetaData(void* OSWindow, EDisplayOutputFormat DisplayOutputFormat, EDisplayColorGamut DisplayColorGamut, bool bHDREnabled);
RENDERCORE_API void HDRRemoveCustomMetaData(void* OSWindow);
struct FDisplayInformation
{
FDisplayInformation()
: DesktopCoordinates(0, 0, 0, 0)
, bHDRSupported(false)
{}
FIntRect DesktopCoordinates;
bool bHDRSupported;
};