Files
UnrealEngineUWP/Engine/Shaders/Shared/VirtualShadowMapDefinitions.h
andrew lauritzen bd803d7e43 SMRT improvements:
- Add slope-based depth extrapolation which improves the quality of penumbras on angled receivers. Costs ~10% performance in some cases so maintaining a permutation/cvar (default on) for scalability.
- Change screen ray trace to be a simple "space skipping" ray that terminates as soon as it goes behind geometry and continue VSM trace from that distance. This avoids various contact-shadow-like artifacts and undesirable/inconsistent contact shadows from things that aren't in the VSM. In certain cases if regular contact shadows are desired on top of VSM the engine contact shadows can be enabled, as it is with CSMs.
- Remove a bunch of use of "halfs" in the shaders as they cause some extra ALU on some platforms and don't appear to really be helping with occupancy anymore
- Small bump to minimum normal bias clamp (only affects things very close to the camera)

#rb brian.karis
[FYI] ola.olsson

#ROBOMERGE-AUTHOR: andrew.lauritzen
#ROBOMERGE-SOURCE: CL 19411300 via CL 19411627
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v928-19376421)

[CL 19413239 by andrew lauritzen in ue5-main branch]
2022-03-16 17:30:21 -04:00

18 lines
931 B
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)