You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
55 lines
1.3 KiB
Plaintext
55 lines
1.3 KiB
Plaintext
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
/*=============================================================================
|
|
ScreenPixelShader.usf: Filter pixel shader source.
|
|
=============================================================================*/
|
|
|
|
#include "Common.ush"
|
|
|
|
Texture2D InTexture;
|
|
SamplerState InTextureSampler;
|
|
int MipLevel;
|
|
|
|
void Main(
|
|
FScreenVertexOutput Input,
|
|
out float4 OutColor : SV_Target0
|
|
)
|
|
{
|
|
OutColor = Texture2DSample(InTexture, InTextureSampler, Input.UV);
|
|
}
|
|
|
|
void MainInvertAlpha(
|
|
FScreenVertexOutput Input,
|
|
out float4 OutColor : SV_Target0
|
|
)
|
|
{
|
|
OutColor = Texture2DSample(InTexture, InTextureSampler, Input.UV);
|
|
OutColor.a = 1.f - OutColor.a;
|
|
}
|
|
|
|
void MainsRGBSource(
|
|
FScreenVertexOutput Input,
|
|
out float4 OutColor : SV_Target0
|
|
)
|
|
{
|
|
OutColor = Texture2DSample(InTexture, InTextureSampler, Input.UV);
|
|
OutColor.rgb = pow( OutColor.rgb, 1.0f / 2.2f );
|
|
}
|
|
|
|
void MainMipLevel(
|
|
FScreenVertexOutput Input,
|
|
out float4 OutColor : SV_Target0
|
|
)
|
|
{
|
|
OutColor = Texture2DSampleLevel(InTexture, InTextureSampler, Input.UV, MipLevel);
|
|
}
|
|
|
|
void MainsRGBSourceMipLevel(
|
|
FScreenVertexOutput Input,
|
|
out float4 OutColor : SV_Target0
|
|
)
|
|
{
|
|
OutColor = Texture2DSampleLevel(InTexture, InTextureSampler, Input.UV, MipLevel);
|
|
OutColor.rgb = pow( OutColor.rgb, 1.0f / 2.2f );
|
|
}
|