2019-12-27 09:26:59 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2019-05-24 19:15:38 -04:00
|
|
|
|
|
|
|
|
#include "Common.ush"
|
|
|
|
|
|
2019-09-14 09:45:25 -04:00
|
|
|
Texture2D InputTexture;
|
|
|
|
|
SamplerState InputSampler;
|
2019-05-24 19:15:38 -04:00
|
|
|
|
2019-06-11 18:27:07 -04:00
|
|
|
void ScreenPassVS(
|
|
|
|
|
in float4 InPosition : ATTRIBUTE0,
|
|
|
|
|
in float2 InTexCoord : ATTRIBUTE1,
|
|
|
|
|
out noperspective float4 OutUVAndScreenPos : TEXCOORD0,
|
|
|
|
|
out float4 OutPosition : SV_POSITION)
|
|
|
|
|
{
|
|
|
|
|
DrawRectangle(InPosition, InTexCoord, OutPosition, OutUVAndScreenPos);
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-24 19:15:38 -04:00
|
|
|
float4 CopyRectPS(
|
|
|
|
|
noperspective float4 UVAndScreenPos : TEXCOORD0
|
2019-09-14 09:45:25 -04:00
|
|
|
) : SV_Target0
|
2019-05-24 19:15:38 -04:00
|
|
|
{
|
2019-09-14 09:45:25 -04:00
|
|
|
float2 UV = UVAndScreenPos.xy;
|
|
|
|
|
return Texture2DSample(InputTexture, InputSampler, UV);
|
|
|
|
|
}
|