You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
// Copyright 1998-2017 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_OutDepthConservative
|
|
,out float4 OutColor : SV_Target0
|
|
)
|
|
{
|
|
ResolvedView = ResolveView();
|
|
|
|
FMaterialPixelParameters MaterialParameters = GetMaterialPixelParameters(Interpolants, SvPosition);
|
|
FPixelMaterialInputs PixelMaterialInputs;
|
|
CalcMaterialParameters(MaterialParameters, PixelMaterialInputs, SvPosition, bIsFrontFace);
|
|
|
|
#if OUTPUT_PIXEL_DEPTH_OFFSET
|
|
ApplyPixelDepthOffsetToMaterialParameters(MaterialParameters, PixelMaterialInputs, OutDepth);
|
|
#endif
|
|
|
|
GetMaterialCoverageAndClipping(MaterialParameters, PixelMaterialInputs);
|
|
|
|
#if USE_INSTANCING
|
|
OutColor = HitProxyId + InstanceHitProxyId;
|
|
#else
|
|
OutColor = HitProxyId;
|
|
#endif
|
|
}
|