Files
UnrealEngineUWP/Engine/Shaders/HitProxyPixelShader.usf
Guillaume Abadie 5f8bec9a35 Do not bind the GBuffer in hit proxy rendering, avoiding a check assertion failure at start-up time with r.RenderTargetPoolTest=1
#code_review: Martin.Mittring

[CL 2527529 by Guillaume Abadie in Main branch]
2015-04-27 17:39:25 -04:00

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
}