#include "common.hlsli"

/*
struct	v2p
{
         float2         tc0:         TEXCOORD0;        // base
         float2         tc1:         TEXCOORD1;        // base
         float2         tc2:         TEXCOORD2;        // base
         float2         tc3:         TEXCOORD3;        // base
};
*/

// Pixel
float4 main(p_build I) : SV_Target
{
    //        float4        t_0        = tex2D                (s_bloom,I.tc0);
    //      float4        t_1        = tex2D                (s_bloom,I.tc1);
    //        float4        t_2        = tex2D                (s_bloom,I.tc2);
    //        float4        t_3        = tex2D                (s_bloom,I.tc3);

    float4 t_0 = s_image.Sample(smp_rtlinear, I.Tex0);
    float4 t_1 = s_image.Sample(smp_rtlinear, I.Tex1);
    float4 t_2 = s_image.Sample(smp_rtlinear, I.Tex2);
    float4 t_3 = s_image.Sample(smp_rtlinear, I.Tex3);

    // out
    return ((t_0 + t_1) + (t_2 + t_3)) / 2;
}
