// Software vertex shader generated by Wild Magic.
//
// var float2    kBaseTCoord      $vin.TEXCOORD0
// var float4    kPixelColor      $vout.COLOR
// var sampler2D SphereMapSampler texunit 0

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

namespace Wm4
{

ColorRGBA p_SphereMap (const float*, SoftSampler** apkSampler,
    const float* afInPixel)
{
    // Get samplers.
    SoftSampler& rkSphereMapSampler = *apkSampler[0];

    // Get input values.
    const float* afBaseTCoord = &afInPixel[0];

    // *** program ***

    ColorRGBA kOutColor = rkSphereMapSampler(afBaseTCoord);
    return kOutColor;
}

WM4_IMPLEMENT_PPROGRAM(SphereMap);
WM4_REGISTER_PPROGRAM(SphereMap);

}
