You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
/*=============================================================================
|
|
ShadowDepthCommon.usf: Shared functionality for shadow depth rendering.
|
|
=============================================================================*/
|
|
|
|
#ifndef PERSPECTIVE_CORRECT_DEPTH
|
|
#define PERSPECTIVE_CORRECT_DEPTH 0
|
|
#endif
|
|
|
|
#ifndef REFLECTIVE_SHADOW_MAP
|
|
#define REFLECTIVE_SHADOW_MAP 0
|
|
#endif
|
|
|
|
#define INTERPOLATE_VF_ATTRIBUTES (!MATERIALBLENDING_SOLID || REFLECTIVE_SHADOW_MAP || MATERIALBLENDING_MASKED)
|
|
#define INTERPOLATE_POSITION ((REFLECTIVE_SHADOW_MAP && !ONEPASS_POINTLIGHT_SHADOW) || MATERIALBLENDING_MASKED)
|
|
|
|
// x: Tweakable depth bias, y:InvMaxSubjectDepthUsed to normalize the outputted depth
|
|
float2 ShadowParams;
|
|
|
|
/** 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 ONEPASS_POINTLIGHT_SHADOW
|
|
float4 GSPosition : TEXCOORD6;
|
|
|
|
#elif PERSPECTIVE_CORRECT_DEPTH
|
|
float ShadowDepth : TEXCOORD6;
|
|
|
|
#elif !COMPILER_SUPPORTS_EMPTY_STRUCTS
|
|
float Dummy : TEXCOORD6;
|
|
|
|
#endif
|
|
|
|
#if INTERPOLATE_POSITION
|
|
float4 PixelPosition : TEXCOORD7;
|
|
#endif
|
|
};
|