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.3 KiB
Plaintext
43 lines
1.3 KiB
Plaintext
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
/*=============================================================================
|
|
HitProxyPixelShader.hlsl: Pixel shader for rendering scene hit proxies.
|
|
=============================================================================*/
|
|
|
|
// Some input nodes can't compute their output value at hit proxy rendering time, and so their implementation changes.
|
|
#define HIT_PROXY_SHADER 1
|
|
|
|
#include "Common.usf"
|
|
#include "Material.usf"
|
|
#include "VertexFactory.usf"
|
|
|
|
float4 HitProxyId;
|
|
|
|
void Main(
|
|
FVertexFactoryInterpolantsVSToPS Interpolants,
|
|
#if USE_INSTANCING
|
|
float4 InstanceHitProxyId : HIT_PROXY_ID,
|
|
#endif
|
|
float4 PixelPosition : TEXCOORD6,
|
|
in INPUT_POSITION_QUALIFIERS float4 SvPosition : SV_Position,
|
|
OPTIONAL_IsFrontFace
|
|
OPTIONAL_OutDepth
|
|
,out float4 OutColor : SV_Target0
|
|
)
|
|
{
|
|
FMaterialPixelParameters MaterialParameters = GetMaterialPixelParameters(Interpolants, PixelPosition);
|
|
CalcMaterialParameters(MaterialParameters, SvPosition, bIsFrontFace, PixelPosition);
|
|
|
|
#if OUTPUT_PIXEL_DEPTH_OFFSET
|
|
ApplyPixelDepthOffsetToMaterialParameters(MaterialParameters, OutDepth);
|
|
#endif
|
|
|
|
GetMaterialCoverageAndClipping(MaterialParameters);
|
|
|
|
#if USE_INSTANCING
|
|
OutColor = HitProxyId + InstanceHitProxyId;
|
|
#else
|
|
OutColor = HitProxyId;
|
|
#endif
|
|
}
|