//
// SmoothSkin_VP.h
//
// Created by Catalin Arsenescu - 26 August 2007
//
// Copyright (C) 2006 Rebellion, All Rights Reserved.
//

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif

#ifndef __ASURA_PS3_SMOOTHSKINSHADOW_VP_H__
#define __ASURA_PS3_SMOOTHSKINSHADOW_VP_H__

extern uint32_t _binary_PS3_SmoothSkin_VP_bin_start;
extern uint32_t _binary_PS3_SmoothSkin_VP_bin_end;

extern uint32_t _binary_PS3_SmoothSkin_DamageMaps_VP_bin_start;
extern uint32_t _binary_PS3_SmoothSkin_DamageMaps_VP_bin_end;


enum SMOOTH_SKIN_PARAMETERS
{
	SK_WorldViewProj,
	SK_WorldMatrix,
	SK_CamPos,
	SK_BoneTransforms,
	SK_UV_Offsets,
	NUM_SMOOTH_SKIN_PARAMETERS
};

static Asura_PS3_GCM_VertexShaderUniformParameter g_axSmoothSkinParameters[] =
{
	//m_szName, m_usArraySize, m_sizeInFloat4ForOneElement, m_usRegister
	{ "g_xWorldViewProjectionMatrix",	1, 4, NULL },
	{ "g_xWorldMatrix",					1, 4, NULL },
	{ "g_xCameraPosition",				1, 1, NULL },
	{ "g_axTransforms",				  450, 1, NULL },
	{ "g_xUV_Offsets",					1, 1, NULL },
};

static Asura_PS3_GCM_VertexShaderUniformParameter g_axSmoothSkinParametersDM[] =
{
	//m_szName, m_usArraySize, m_sizeInFloat4ForOneElement, m_usRegister
	{ "g_xWorldViewProjectionMatrix",	1, 4, NULL },
	{ "g_xWorldMatrix",					1, 4, NULL },
	{ "g_xCameraPosition",				1, 1, NULL },
	{ "g_axTransforms",				  450, 1, NULL },
	{ "g_xUV_Offsets",					1, 1, NULL },
};


class Asura_PS3_VP_SmoothSkin : public Asura_PS3_GCM_VertexShader
{
public:
	Asura_PS3_VP_SmoothSkin() : Asura_PS3_GCM_VertexShader( (unsigned char *)&_binary_PS3_SmoothSkin_VP_bin_start, (unsigned char *)&_binary_PS3_SmoothSkin_VP_bin_end, g_axSmoothSkinParameters, NUM_SMOOTH_SKIN_PARAMETERS )
	{
	}

	~Asura_PS3_VP_SmoothSkin()
	{
		u_int i;
		for( i = 0; i < NUM_SMOOTH_SKIN_PARAMETERS; ++i )
		{
			g_axSmoothSkinParameters[ i ].CleanUp();
		}
	}
};

class Asura_PS3_VP_SmoothSkinDM : public Asura_PS3_GCM_VertexShader
{
public:
	Asura_PS3_VP_SmoothSkinDM() : Asura_PS3_GCM_VertexShader( (unsigned char *)&_binary_PS3_SmoothSkin_DamageMaps_VP_bin_start, (unsigned char *)&_binary_PS3_SmoothSkin_DamageMaps_VP_bin_end, g_axSmoothSkinParametersDM, NUM_SMOOTH_SKIN_PARAMETERS )
	{
	}

	~Asura_PS3_VP_SmoothSkinDM()
	{
		u_int i;
		for( i = 0; i < NUM_SMOOTH_SKIN_PARAMETERS; ++i )
		{
			g_axSmoothSkinParametersDM[ i ].CleanUp();
		}
	}
};

#endif //#ifndef __ASURA_PS3_SMOOTHSKINSHADOW_VP_H__
