//
// FSFX_ColourMap_FP.h
//
// Created by Catalin Arsenescu - 11 October 2007
//
// Copyright (C) 2006 Rebellion, All Rights Reserved.
//

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif

#ifndef __ASURA_PS3_FSFX_COLOURMAP_FP_H__
#define __ASURA_PS3_FSFX_COLOURMAP_FP_H__

extern u_int _binary_PS3_FSFX_ColourMap_FP_bin_start;
extern u_int _binary_PS3_FSFX_ColourMap_FP_bin_end;

enum FRAGMENT_SHADER_UNIFORM_CM
{
	FPCM_Intensity,

	FPCM_ELEMENTS
};

enum TEXTURE_UNITS_CM
{
	FPCM_InitialImage,
	FPCM_ColourMap,

	FPCM_TU_ELEMENTS
};

class Asura_PS3_FSFX_CM_Handles : public Asura_PS3_FP_Handles
{
public:
	Asura_PS3_FSFX_CM_Handles() : Asura_PS3_FP_Handles( FPCM_ELEMENTS, FPCM_TU_ELEMENTS )
	{}

	void InitialiseFromShader( Asura_PS3_FragmentShaderBase* pxShader )
	{
		pxShader->InitUniformElement( FPCM_Intensity,	"g_fIntensity",		1 );

		pxShader->InitTextureUnit( FPCM_InitialImage,	"g_xInitialImage",	CELL_GCM_TEXTURE_CLAMP, CELL_GCM_TEXTURE_CLAMP, CELL_GCM_TEXTURE_NEAREST, CELL_GCM_TEXTURE_NEAREST
			, true
			);
		pxShader->InitTextureUnit( FPCM_ColourMap,		"g_xColourMap",		CELL_GCM_TEXTURE_CLAMP, CELL_GCM_TEXTURE_CLAMP, CELL_GCM_TEXTURE_LINEAR_LINEAR, CELL_GCM_TEXTURE_LINEAR
			, true
			);
	}
};

#endif //#ifndef __ASURA_PS3_FSFX_COLOURMAP_FP_H__
