// Copyright PICO Technology Co., Ltd. All rights reserved. // This plugin incorporates portions of the UnrealĀ® Engine. UnrealĀ® is a trademark or registered trademark of Epic Games, Inc. in the United States of America and elsewhere. // Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "PXR_HMDPrivate.h" #include "PXR_HMDModule.h" #if PICO_HMD_SUPPORTED_PLATFORMS static const float ClampPixelDensityMin = 0.5f; static const float ClampPixelDensityMax = 2.0f; //------------------------------------------------------------------------------------------------- // FGameSettings //------------------------------------------------------------------------------------------------- class FGameSettings : public TSharedFromThis { public: union { struct { uint64 bStereoEnabled : 1; uint64 bHMDEnabled : 1; uint64 bPauseRendering : 1; uint64 bPixelDensityAdaptive : 1; uint64 bsRGBEyeBuffer : 1; }; uint64 Raw; } Flags; FVector BaseOffset; FQuat BaseOrientation; float CustomOffsetYaw; FIntRect EyeRenderViewport[2]; FIntRect EyeUnscaledRenderViewport[2]; FMatrix EyeProjectionMatrices[2]; FMatrix MonoProjectionMatrix; FIntPoint RenderTargetSize; float PixelDensity; float PixelDensityMin; float PixelDensityMax; bool bAdaptiveResolutionEnabled; EPICOXRAdaptiveResolutionPowerSetting AdaptiveResolutionPowerSetting; PxrFoveationLevel FoveatedRenderingLevel; EPICOXRCoordinateType CoordinateType; bool bApplyColorScaleAndOffsetToAllLayers; PxrVector4f ColorScale, ColorOffset; EShaderPlatform CurrentShaderPlatform; bool bLateLatching; bool bWaitFrameAtGameFrameTail; int SeeThroughState; public: FGameSettings(); virtual ~FGameSettings() {} bool IsStereoEnabled() const { return Flags.bStereoEnabled && Flags.bHMDEnabled; } void SetPixelDensity(float NewPixelDensity); void EnableAdaptiveResolution(bool bEnable); bool IsAdaptiveResolutionEnabled() const; TSharedPtr Clone() const; }; typedef TSharedPtr FSettingsPtr; #endif //PICO_HMD_SUPPORTED_PLATFORMS