//
// SFX_PFX_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_PFX_FP_H__
#define __ASURA_PS3_SFX_PFX_FP_H__

extern u_int _binary_PS3_SFX_PFX_FP0000_bin_start;
extern u_int _binary_PS3_SFX_PFX_FP0000_bin_end;

extern u_int _binary_PS3_SFX_PFX_FP0001_bin_start;
extern u_int _binary_PS3_SFX_PFX_FP0001_bin_end;

extern u_int _binary_PS3_SFX_PFX_FP0010_bin_start;
extern u_int _binary_PS3_SFX_PFX_FP0010_bin_end;

extern u_int _binary_PS3_SFX_PFX_FP0011_bin_start;
extern u_int _binary_PS3_SFX_PFX_FP0011_bin_end;

extern u_int _binary_PS3_SFX_PFX_FP0100_bin_start;
extern u_int _binary_PS3_SFX_PFX_FP0100_bin_end;

extern u_int _binary_PS3_SFX_PFX_FP0101_bin_start;
extern u_int _binary_PS3_SFX_PFX_FP0101_bin_end;

extern u_int _binary_PS3_SFX_PFX_FP0110_bin_start;
extern u_int _binary_PS3_SFX_PFX_FP0110_bin_end;

extern u_int _binary_PS3_SFX_PFX_FP0111_bin_start;
extern u_int _binary_PS3_SFX_PFX_FP0111_bin_end;

extern u_int _binary_PS3_SFX_PFX_FP1000_bin_start;
extern u_int _binary_PS3_SFX_PFX_FP1000_bin_end;

extern u_int _binary_PS3_SFX_PFX_FP1001_bin_start;
extern u_int _binary_PS3_SFX_PFX_FP1001_bin_end;

extern u_int _binary_PS3_SFX_PFX_FP1010_bin_start;
extern u_int _binary_PS3_SFX_PFX_FP1010_bin_end;

extern u_int _binary_PS3_SFX_PFX_FP1011_bin_start;
extern u_int _binary_PS3_SFX_PFX_FP1011_bin_end;

extern u_int _binary_PS3_SFX_PFX_FP1100_bin_start;
extern u_int _binary_PS3_SFX_PFX_FP1100_bin_end;

extern u_int _binary_PS3_SFX_PFX_FP1101_bin_start;
extern u_int _binary_PS3_SFX_PFX_FP1101_bin_end;

extern u_int _binary_PS3_SFX_PFX_FP1110_bin_start;
extern u_int _binary_PS3_SFX_PFX_FP1110_bin_end;

extern u_int _binary_PS3_SFX_PFX_FP1111_bin_start;
extern u_int _binary_PS3_SFX_PFX_FP1111_bin_end;

enum FRAGMENT_SHADER_UNIFORM
{
	FP_FogColour,
	FP_FogProperties,
	FP_OneOverScreenDimensions,
	FP_DepthAdjustment,
	FP_ELEMENTS
};

enum TEXTURE_UNITS
{
	FP_DepthTexture,
	FP_DiffuseMap,
	FP_FogTexture,
	FP_HeatHazeCaptureTexture,
	FP_TU_ELEMENTS
};

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

	void InitialiseFromShader( Asura_PS3_FragmentShaderBase* pxShader )
	{
		pxShader->InitUniformElement( FP_FogColour,					"g_xFogColour",					1 );
		pxShader->InitUniformElement( FP_FogProperties,				"g_xFogProperties",				1 );
		pxShader->InitUniformElement( FP_DepthAdjustment,			"g_xDepthAdjustment",			1 );
		pxShader->InitUniformElement( FP_OneOverScreenDimensions,	"g_xOneOverScreenDimensions",	1 );

		pxShader->InitTextureUnit( FP_DepthTexture,				"g_xDepthBufferSampler",	CELL_GCM_TEXTURE_CLAMP, CELL_GCM_TEXTURE_CLAMP, CELL_GCM_TEXTURE_NEAREST, CELL_GCM_TEXTURE_NEAREST );
		pxShader->InitTextureUnit( FP_DiffuseMap,				"g_xDiffuseMap",				CELL_GCM_TEXTURE_WRAP, CELL_GCM_TEXTURE_WRAP, CELL_GCM_TEXTURE_LINEAR_LINEAR, CELL_GCM_TEXTURE_LINEAR
			, true
			);
		pxShader->InitTextureUnit( FP_FogTexture,				"g_xFogSampler",				CELL_GCM_TEXTURE_CLAMP, CELL_GCM_TEXTURE_CLAMP, CELL_GCM_TEXTURE_NEAREST, CELL_GCM_TEXTURE_NEAREST );
		pxShader->InitTextureUnit( FP_HeatHazeCaptureTexture,	"g_xHeatHazeCaptureTexture",	CELL_GCM_TEXTURE_CLAMP, CELL_GCM_TEXTURE_CLAMP, CELL_GCM_TEXTURE_LINEAR, CELL_GCM_TEXTURE_LINEAR
			, true
			);
	}
};

#endif //#ifndef __ASURA_PS3_SFX_PFX_FP_H__
