You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb none #jira UE-135770 #preflight 61f3d600801201ab38802f25 #ROBOMERGE-AUTHOR: guillaume.abadie #ROBOMERGE-SOURCE: CL 18770204 in //UE5/Release-5.0/... via CL 18770211 via CL 18770261 #ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472) [CL 18770266 by guillaume abadie in ue5-main branch]
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
/*=============================================================================
|
|
TranslucencyUpsampling.usf: PostProcessing shader to upscale
|
|
=============================================================================*/
|
|
|
|
#include "Common.ush"
|
|
#include "ScreenPass.ush"
|
|
|
|
|
|
uint2 StencilPixelPosMin;
|
|
uint2 StencilPixelPosMax;
|
|
FScreenTransform SvPositionToStencilPixelCoord;
|
|
uint StencilMask;
|
|
Texture2D<uint2> StencilTexture;
|
|
|
|
void UpsampleResponsiveAAPS(FScreenVertexOutput Input, out float4 OutColor : SV_Target0)
|
|
{
|
|
float2 SvPosition = Input.Position.xy;
|
|
|
|
uint2 StencilPixelPos = uint2(ApplyScreenTransform(SvPosition, SvPositionToStencilPixelCoord));
|
|
StencilPixelPos = clamp(StencilPixelPos, StencilPixelPosMin, StencilPixelPosMax);
|
|
|
|
uint StencilValue = StencilTexture.Load(int3(StencilPixelPos, 0)) STENCIL_COMPONENT_SWIZZLE;
|
|
|
|
// If the responsive AA stencil was not set, discard the pixel to not write the responsive AA in the full res depth buffer.
|
|
if ((StencilValue & StencilMask) == 0)
|
|
{
|
|
discard;
|
|
}
|
|
|
|
OutColor = float(0.0).xxxx;
|
|
}
|