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

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif

#ifndef __ASURA_PS3_LIGHTSHAFT_FP_H__
#define __ASURA_PS3_LIGHTSHAFT_FP_H__

extern u_int _binary_PS3_LightShaft_FP_bin_start;
extern u_int _binary_PS3_LightShaft_FP_bin_end;

enum FRAGMENT_SHADER_UNIFORM_SHAFT
{
	FPS_DepthAdjustment,
	
	FPS_ELEMENTS
};

enum TEXTURE_UNITS_SHAFT
{
	FPS_DepthBufferSampler,
	FPS_TextureSampler,
	FPS_TextureSampler2,

	FPS_TU_ELEMENTS
};

class Asura_PS3_LightShaft_Handles : public Asura_PS3_FP_Handles
{
public:
	Asura_PS3_LightShaft_Handles() : Asura_PS3_FP_Handles( FPS_ELEMENTS, FPS_TU_ELEMENTS )
	{}

	void InitialiseFromShader( Asura_PS3_FragmentShaderBase* pxShader )
	{
		pxShader->InitUniformElement( FPS_DepthAdjustment,		"g_xDepthAdjustment",		1 );

		pxShader->InitTextureUnit( FPS_DepthBufferSampler,		"g_xDepthBufferSampler",	CELL_GCM_TEXTURE_CLAMP, CELL_GCM_TEXTURE_CLAMP, CELL_GCM_TEXTURE_NEAREST, CELL_GCM_TEXTURE_NEAREST );
		pxShader->InitTextureUnit( FPS_TextureSampler,			"g_xTextureSampler",		CELL_GCM_TEXTURE_WRAP, CELL_GCM_TEXTURE_WRAP, CELL_GCM_TEXTURE_LINEAR_LINEAR, CELL_GCM_TEXTURE_LINEAR
			, true
			);
		pxShader->InitTextureUnit( FPS_TextureSampler2,			"g_xTextureSampler2",		CELL_GCM_TEXTURE_WRAP, CELL_GCM_TEXTURE_WRAP, CELL_GCM_TEXTURE_LINEAR_LINEAR, CELL_GCM_TEXTURE_LINEAR
			, true
			);
	}
};

#endif //#ifndef __ASURA_PS3_LIGHTSHAFT_FP_H__
