//
// SFX_Skybox_FP.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_FP_H__
#define __ASURA_PS3_SFX_SKYBOX_FP_H__

enum TEXTURE_UNITS
{
	FP_BaseTexture,

	FP_TU_ELEMENTS
};

enum FRAGMENT_SHADER_UNIFORM
{
	FP_SkyboxFactor,
	FP_Fog,
	FP_Distance,
	FP_SkyboxColour,
	FP_SunDir1,
	FP_SunDir2,
	FP_HazeGradientPower1,
	FP_HazeGradientPower2,
	FP_HazeColour1,
	FP_HazeColour2,
	FP_SunGradientPower1,
	FP_SunGradientPower2,
	FP_SunColour1,
	FP_SunColour2,

	FP_ELEMENTS
};

class Asura_PS3_Skybox_Handles : public Asura_PS3_FP_Handles
{
public:
	Asura_PS3_Skybox_Handles() : Asura_PS3_FP_Handles( FP_ELEMENTS, FP_TU_ELEMENTS )
	{}

	void InitialiseFromShader( Asura_PS3_FragmentShaderBase* pxShader )
	{
		pxShader->InitUniformElement( FP_SkyboxFactor,			"SkyboxFactor",				1 );
		pxShader->InitUniformElement( FP_Fog,					"Fog",						1 );
		pxShader->InitUniformElement( FP_Distance,				"g_xDistance",				1 );
		pxShader->InitUniformElement( FP_SkyboxColour,			"g_xSkyboxColour",			1 );
		pxShader->InitUniformElement( FP_SunDir1,				"g_xSunDir1",				1 );
		pxShader->InitUniformElement( FP_SunDir2,				"g_xSunDir2",				1 );
		pxShader->InitUniformElement( FP_HazeGradientPower1,	"g_xHazeGradientPower1",	1 );
		pxShader->InitUniformElement( FP_HazeGradientPower2,	"g_xHazeGradientPower2",	1 );
		pxShader->InitUniformElement( FP_HazeColour1,			"g_xHazeColour1",			1 );
		pxShader->InitUniformElement( FP_HazeColour2,			"g_xHazeColour2",			1 );
		pxShader->InitUniformElement( FP_SunGradientPower1,		"g_xSunGradientPower1",		1 );
		pxShader->InitUniformElement( FP_SunGradientPower2,		"g_xSunGradientPower2",		1 );
		pxShader->InitUniformElement( FP_SunColour1,			"g_xSunColour1",			1 );
		pxShader->InitUniformElement( FP_SunColour2,			"g_xSunColour2",			1 );

		pxShader->InitTextureUnit( FP_BaseTexture,	"BaseTexture",	CELL_GCM_TEXTURE_MIRROR, CELL_GCM_TEXTURE_MIRROR, CELL_GCM_TEXTURE_LINEAR_LINEAR, CELL_GCM_TEXTURE_LINEAR
			, true
			);
	}
};

#endif //#ifndef __ASURA_PS3_SFX_SKYBOX_FP_H__
