// Software pixel shader generated by Wild Magic.
//
// var float3    kTCoord     $vin.TEXCOORD0
// var float4    kPixelColor $vout.COLOR
// var float     CommonAlpha c[0]
// var sampler3D BaseSampler texunit 0

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

namespace Wm4
{

ColorRGBA p_VolumeTextures (const float* afRegister, SoftSampler** apkSampler,
    const float* afInPixel)
{
    // Get register values.
    float fAlpha = afRegister[0];

    // Get samplers.
    SoftSampler& rkBaseSampler = *apkSampler[0];

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

    // *** program ***
    
    ColorRGBA kPixelColor = rkBaseSampler(afTCoord);
    kPixelColor[3] = fAlpha;
    return kPixelColor;
}

WM4_IMPLEMENT_PPROGRAM(VolumeTextures);
WM4_REGISTER_PPROGRAM(VolumeTextures);

}
