utkuatlastuzcu/tst / Engine /Shaders /ShadowDepthPixelShader.usf
utkuatlastuzcu's picture
download
raw
1.18 kB
/*=============================================================================
ShadowDepthPixelShader.hlsl: Pixel shader for writing shadow depth.
Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
=============================================================================*/
#include "Common.usf"
#include "Material.usf"
#include "VertexFactory.usf"
float InvMaxSubjectDepth;
float DepthBias;
void Main(
FVertexFactoryInterpolants Interpolants,
in float4 ShadowPosition : TEXCOORD7,
OPTIONAL_FacingSign
out float4 OutColor : COLOR0,
out float OutDepth : DEPTH
)
{
FMaterialParameters MaterialParameters = GetMaterialParameters(Interpolants);
CalcMaterialParameters(MaterialParameters, FacingSign, float3(0,0,1), float4(0,0,0,1));
//GetMaterialClipping(MaterialParameters);
ShadowPosition.z *= InvMaxSubjectDepth;
ShadowPosition.z += DepthBias;
#if MATERIALBLENDING_MASKED
ShadowPosition.z = GetMaterialMask(MaterialParameters) > 0 ? ShadowPosition.z : 100.0f;
#endif
OutDepth = saturate(ShadowPosition.z);
// RETURN_COLOR not needed unless writing to SceneColor;
OutColor = saturate(ShadowPosition.z);
}

Xet Storage Details

Size:
1.18 kB
·
Xet hash:
dc9e1f52f59678e5d17d57c6f2433c12f7bdba4df49adb1387fac53956bbb129

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.