//
// SFX_Skybox_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_SFX_SKYBOX_VP_H__
#define __ASURA_PS3_SFX_SKYBOX_VP_H__

extern u_int _binary_PS3_SFX_Skybox_VP_bin_start;
extern u_int _binary_PS3_SFX_Skybox_VP_bin_end;

extern u_int _binary_PS3_SFX_Skybox_New_VP_bin_start;
extern u_int _binary_PS3_SFX_Skybox_New_VP_bin_end;

static Asura_PS3_GCM_VertexShaderUniformParameter g_axVertexShaderUniformOld[] =
{
	//m_szName, m_usArraySize, m_sizeInFloat4ForOneElement, m_usRegister
	{ "WorldViewProjMatrix",	1, 4, NULL },
};

enum VERTEX_SHADER_UNIFORM
{
	OLD_VIEW_PROJECTION_MATRIX
};

static Asura_PS3_GCM_VertexShaderUniformParameter g_axVertexShaderUniformNew[] =
{
	//m_szName, m_usArraySize, m_sizeInFloat4ForOneElement, m_usRegister
	{ "g_xWorldViewProjMatrix",	1, 4, NULL },
	{ "g_xWorldMatrix",			1, 4, NULL },
	{ "g_xCameraPosition",		1, 1, NULL },
};

enum VERTEX_SHADER_UNIFORM_NEW
{
	NEW_VIEW_PROJECTION_MATRIX,
	NEW_WORLD_MATRIX,
	NEW_CAMERA_POSITION
};

class Asura_PS3_VP_PFX_Skybox : public Asura_PS3_GCM_VertexShader
{
public:
	Asura_PS3_VP_PFX_Skybox() : Asura_PS3_GCM_VertexShader( (unsigned char *)&_binary_PS3_SFX_Skybox_VP_bin_start, (unsigned char *)&_binary_PS3_SFX_Skybox_VP_bin_end, g_axVertexShaderUniformOld, sizeof ( g_axVertexShaderUniformOld ) / sizeof ( Asura_PS3_GCM_VertexShaderUniformParameter ) )
	{
	}

	~Asura_PS3_VP_PFX_Skybox()
	{
		u_int i;
		for( i = 0; i < sizeof( g_axVertexShaderUniformOld ) / sizeof( Asura_PS3_GCM_VertexShaderUniformParameter ); ++i )
		{
			g_axVertexShaderUniformOld[ i ].CleanUp();
		}
	}
};

class Asura_PS3_VP_PFX_SkyboxNew : public Asura_PS3_GCM_VertexShader
{
public:
	Asura_PS3_VP_PFX_SkyboxNew() : Asura_PS3_GCM_VertexShader( (unsigned char *)&_binary_PS3_SFX_Skybox_New_VP_bin_start, (unsigned char *)&_binary_PS3_SFX_Skybox_New_VP_bin_end, g_axVertexShaderUniformNew, sizeof ( g_axVertexShaderUniformNew ) / sizeof ( Asura_PS3_GCM_VertexShaderUniformParameter ) )
	{
	}

	~Asura_PS3_VP_PFX_SkyboxNew()
	{
		u_int i;
		for( i = 0; i < sizeof( g_axVertexShaderUniformNew ) / sizeof( Asura_PS3_GCM_VertexShaderUniformParameter ); ++i )
		{
			g_axVertexShaderUniformNew[ i ].CleanUp();
		}
	}
};

#endif //#ifndef __ASURA_PS3_SFX_SKYBOX_VP_H__
