// Software pixel shader generated by Wild Magic.
//
// var float2    kTCoord0    $vin.TEXCOORD0
// var float2    kTCoord1    $vin.TEXCOORD1
// var float4    kPixelColor $vout.COLOR
// var sampler2D Sampler0    texunit 0
// var sampler2D Sampler1    texunit 1

#include "Wm4SoftRendererPCH.h"
#include "Wm4SoftRenderer.h"
#include "Wm4ColorRGBA.h"

namespace Wm4
{

ColorRGBA p_T0s1d0T1s1d1 (const float*, SoftSampler** apkSampler,
    const float* afInPixel)
{
    // Get samplers.
    SoftSampler& rkSampler0 = *apkSampler[0];
    SoftSampler& rkSampler1 = *apkSampler[1];

    // Get input values.
    const float* afTCoord0 = &afInPixel[0];
    const float* afTCoord1 = &afInPixel[2];

    // *** program ***
    
    ColorRGBA kColor0 = rkSampler0(afTCoord0);
    ColorRGBA kColor1 = rkSampler1(afTCoord1);
    ColorRGBA kPixelColor = kColor0 + kColor1;
    kPixelColor.Clamp();
    return kPixelColor;
}

WM4_IMPLEMENT_PPROGRAM(T0s1d0T1s1d1);

}
