Files
UnrealEngineUWP/Engine/Shaders/Private/ShadowDepthCommon.ush
Ola Olsson df492855e0 Removed GPUCULL_TODO define (fixed in on-state)
#preflight 60acc49b58f02e0001a0a996
#rb graham.wihlidal,Arciel.Rekman,Brandon.Schaefer,will.damon

[CL 16446355 by Ola Olsson in ue5-main branch]
2021-05-25 08:15:14 -04:00

46 lines
1.5 KiB
Plaintext

// Copyright Epic Games, Inc. All Rights Reserved.
/*=============================================================================
ShadowDepthCommon.usf: Shared functionality for shadow depth rendering.
=============================================================================*/
#ifndef PERSPECTIVE_CORRECT_DEPTH
#define PERSPECTIVE_CORRECT_DEPTH 0
#endif
#define INTERPOLATE_VF_ATTRIBUTES (!MATERIALBLENDING_SOLID || MATERIALBLENDING_MASKED || (REQUIRES_VF_ATTRIBUTES_FOR_CLIPPING && !POSITION_ONLY))
#define INTERPOLATE_POSITION (MATERIALBLENDING_MASKED)
/** Data passed from the vertex shader to the pixel shader for the shadow depth pass. */
struct FShadowDepthVSToPS
{
#if INTERPOLATE_VF_ATTRIBUTES
FVertexFactoryInterpolantsVSToPS FactoryInterpolants;
#endif
#if PERSPECTIVE_CORRECT_DEPTH
float ShadowDepth : TEXCOORD6;
float DepthBias : TEXCOORD8;
#elif !COMPILER_SUPPORTS_EMPTY_STRUCTS && !ONEPASS_POINTLIGHT_SHADOW
float Dummy : TEXCOORD6;
#endif
#if INTERPOLATE_POSITION
// world space position needed in some cases, could be changed to be reconsructed from SvPosition (more tricky as this is not from camera perspective)
float3 PixelPosition : TEXCOORD7;
#endif
};
#if ONEPASS_POINTLIGHT_SHADOW
//only for one pass pointlights
struct FShadowDepthVSToGS : FShadowDepthVSToPS
{
float4 GSPosition : TEXCOORD6;
float3 WorldNormal : TEXCOORD8;
#if ENABLE_FALLBACK_POINTLIGHT_SHADOW_GS
nointerpolation uint ViewIndex : TEXCOORD9;
#endif // ENABLE_FALLBACK_POINTLIGHT_SHADOW_GS
};
#endif