
Texture2DArray g_txTextures    : TextureArray;

//--------------------------------------------------------------------------------------

SamplerState g_samAniso
{
    Filter = ANISOTROPIC;
    AddressU = Wrap;
    AddressV = Wrap;
};

//--------------------------------------------------------------------------------------

struct VS_OUTPUT {
    float4 Position : SV_Position;
    float3 TextureUV : TEXCOORD0;
};

//--------------------------------------------------------------------------------------

float4 textureArray_p ( VS_OUTPUT In ) : SV_Target
{
	int numberOfTextures = 20;
	float3 texcoord;
	texcoord = In.TextureUV;
	texcoord.z = floor(texcoord.z);
    float4 c0 = g_txTextures.Sample(g_samAniso, texcoord);
	texcoord.z += 1;
    float4 c1 = g_txTextures.Sample(g_samAniso, texcoord);

	return lerp(c0, c1, frac(In.TextureUV.z));
}
