Files
UnrealEngineUWP/Engine/Shaders/Private/TranslucencyUpsampling.usf
guillaume abadie 82d704ea77 Fixes saparate translucency screen percentage
#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]
2022-01-28 08:13:09 -05:00

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;
}