You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Remove multiple cache managesr that were implemented to work around issues with the previous naive implementation Fixes some invalidation issues in cases where multiple managers existed previously NOTE: This change brings pages from scene captures and ndisplay and similar systems back into the main physical page pool, so it may be necessary in some of these cases to increase the page pool size. #rb ola.olsson jason.hoerner [CL 26352061 by andrew lauritzen in ue5-main branch]
65 lines
2.3 KiB
C++
65 lines
2.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
/*================================================================================================
|
|
VirtualShadowMapDefinitions.h: used in virtual shadow map shaders and C++ code to define common constants
|
|
!!! Changing this file requires recompilation of the engine !!!
|
|
=================================================================================================*/
|
|
|
|
#pragma once
|
|
|
|
#define VIRTUAL_SHADOW_MAP_VISUALIZE_NONE 0
|
|
#define VIRTUAL_SHADOW_MAP_VISUALIZE_SHADOW_FACTOR (1 << 0)
|
|
#define VIRTUAL_SHADOW_MAP_VISUALIZE_CLIPMAP_OR_MIP (1 << 1)
|
|
#define VIRTUAL_SHADOW_MAP_VISUALIZE_VIRTUAL_PAGE (1 << 2)
|
|
#define VIRTUAL_SHADOW_MAP_VISUALIZE_CACHED_PAGE (1 << 3)
|
|
#define VIRTUAL_SHADOW_MAP_VISUALIZE_SMRT_RAY_COUNT (1 << 4)
|
|
#define VIRTUAL_SHADOW_MAP_VISUALIZE_CLIPMAP_VIRTUAL_SPACE (1 << 5)
|
|
#define VIRTUAL_SHADOW_MAP_VISUALIZE_GENERAL_DEBUG (1 << 6)
|
|
#define VIRTUAL_SHADOW_MAP_VISUALIZE_DIRTY_PAGE (1 << 7)
|
|
#define VIRTUAL_SHADOW_MAP_VISUALIZE_GPU_INVALIDATED_PAGE (1 << 8)
|
|
#define VIRTUAL_SHADOW_MAP_VISUALIZE_MERGED_PAGE (1 << 9)
|
|
|
|
|
|
#define VSM_PROJ_FLAG_CURRENT_DISTANT_LIGHT (1U << 0)
|
|
#define VSM_PROJ_FLAG_UNCACHED (1U << 1) // Used to indicate that the light is uncached and should only render to dynamic pages
|
|
#define VSM_PROJ_FLAG_UNREFERENCED (1U << 2) // Used to indicate that the light is not referenced/rendered to this render
|
|
|
|
// Hard limit for max distant lights supported 8k for now - we may revise later. We need to keep them in a fixed range for now to make allocation easy and minimize overhead for indexing.
|
|
#define VSM_MAX_SINGLE_PAGE_SHADOW_MAPS (1024U * 8U)
|
|
|
|
#ifdef __cplusplus
|
|
#include "HLSLTypeAliases.h"
|
|
|
|
namespace UE::HLSL
|
|
{
|
|
#endif
|
|
|
|
struct FVSMVisibleInstanceCmd
|
|
{
|
|
uint PackedPageInfo;
|
|
uint InstanceIdAndFlags;
|
|
uint IndirectArgIndex;
|
|
};
|
|
|
|
struct FVSMCullingBatchInfo
|
|
{
|
|
uint FirstPrimaryView;
|
|
uint NumPrimaryViews;
|
|
uint PrimitiveRevealedOffset;
|
|
uint PrimitiveRevealedNum;
|
|
};
|
|
|
|
struct FNextVirtualShadowMapData
|
|
{
|
|
int NextVirtualShadowMapId;
|
|
int2 PageAddressOffset;
|
|
int _Padding;
|
|
};
|
|
|
|
#ifdef __cplusplus
|
|
} // namespace UE::HLSL
|
|
|
|
using FVSMVisibleInstanceCmd = UE::HLSL::FVSMVisibleInstanceCmd;
|
|
using FVSMCullingBatchInfo = UE::HLSL::FVSMCullingBatchInfo;
|
|
using FNextVirtualShadowMapData = UE::HLSL::FNextVirtualShadowMapData;
|
|
#endif |