2017-07-16 11:46:13 +00:00
|
|
|
struct FxaaTex { SamplerState smpl; Texture2D tex; };
|
|
|
|
SamplerState g_tInputTexture_sampler; Texture2D g_tInputTexture;
|
|
|
|
|
|
|
|
float4 lookUp(FxaaTex tex)
|
|
|
|
{
|
|
|
|
return tex.tex.Sample(tex.smpl, float2(0.3, 0.4));
|
|
|
|
}
|
|
|
|
|
2017-08-15 16:18:32 +00:00
|
|
|
FxaaTex fillOpaque()
|
|
|
|
{
|
|
|
|
FxaaTex t;
|
|
|
|
t.smpl = g_tInputTexture_sampler;
|
|
|
|
t.tex = g_tInputTexture;
|
|
|
|
return t;
|
|
|
|
}
|
|
|
|
|
2017-07-16 11:46:13 +00:00
|
|
|
float4 main() : SV_TARGET0
|
|
|
|
{
|
2017-08-15 16:18:32 +00:00
|
|
|
FxaaTex tex1 = { g_tInputTexture_sampler, g_tInputTexture };
|
2017-11-29 06:47:08 +00:00
|
|
|
float4 res = lookUp(tex1);
|
2017-08-15 16:18:32 +00:00
|
|
|
FxaaTex tex2 = fillOpaque();
|
2017-11-29 06:47:08 +00:00
|
|
|
res += lookUp(tex2);
|
2017-10-03 07:10:26 +00:00
|
|
|
FxaaTex tex3 = tex1;
|
2017-11-29 06:47:08 +00:00
|
|
|
res += lookUp(tex3);
|
2017-11-16 23:03:18 +00:00
|
|
|
|
2017-11-29 06:47:08 +00:00
|
|
|
return res;
|
2017-10-03 07:10:26 +00:00
|
|
|
}
|