mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
36 lines
628 B
HLSL
36 lines
628 B
HLSL
// TODO: General pipeline for post processing effects
|
|
|
|
Texture2D Texture : register(t0);
|
|
SamplerState TextureSampler : register(s0);
|
|
|
|
struct VS_IN
|
|
{
|
|
float2 Position : POSITION;
|
|
float2 TexCoord : TEXCOORD0;
|
|
};
|
|
|
|
struct PS_IN
|
|
{
|
|
float4 Position : SV_POSITION;
|
|
float2 TexCoord : TEXCOORD;
|
|
};
|
|
|
|
PS_IN VS(VS_IN input)
|
|
{
|
|
PS_IN output;
|
|
|
|
output.Position = float4(input.Position, 0, 1);
|
|
output.TexCoord = input.TexCoord;
|
|
|
|
return output;
|
|
}
|
|
|
|
float4 PS(PS_IN input) : SV_TARGET
|
|
{
|
|
float4 color = Texture.Sample(TextureSampler, input.TexCoord);
|
|
|
|
return float4(pow(color.rgb, 1.0f / 2.2f), color.a);
|
|
}
|
|
|
|
#pragma Effect[VS = VS; PS = PS]
|