// Copyright Epic Games, Inc. All Rights Reserved. #include "SMAACommon.ush" struct FSMAANeighborhoodBlendingScreenVertexOutput { noperspective float2 UV : TEXCOORD0; float4 Offset : TEXCOORD1; float4 Position : SV_POSITION; }; Texture2D BlendTex; /*----------------------------------------------------------------------------- vertex shader -----------------------------------------------------------------------------*/ #ifdef MainVS void MainVS( float2 InPosition : ATTRIBUTE0, float2 InUV : ATTRIBUTE1, out FSMAANeighborhoodBlendingScreenVertexOutput Output ) { DrawRectangle( float4( InPosition, 0, 1 ), InUV, Output.Position, Output.UV); SMAANeighborhoodBlendingVS(Output.UV, Output.Offset); } #endif // MainVS /*----------------------------------------------------------------------------- pixel shader -----------------------------------------------------------------------------*/ #ifdef MainPS void MainPS( FSMAANeighborhoodBlendingScreenVertexOutput Input, out float4 OutColor : SV_Target0) { OutColor = SMAANeighborhoodBlendingPS(Input.UV, Input.Offset, Input_Texture, BlendTex); #if DIM_ALPHA_CHANNEL == 0 OutColor.a = 1.0; #endif } #endif // MainPS