fragment_program Ogre/Compositor/HalftoneFPCg cg
{
	source HalftoneFP.cg
	entry_point Halftone_ps
	profiles ps_4_0 ps_2_0 arbfp1
	
	default_params
	{
	    param_named numTiles float2 133.3 100
	    param_named iNumTiles float2 0.00750750 0.01
	    param_named iNumTiles2 float2 0.00375375 0.005
	    param_named lum float4 0.30 0.59 0.11 0.0
	}
}

fragment_program Ogre/Compositor/HalftoneFPGLSL glsl
{
	source HalftoneFP.glsl
	syntax glsl150
	
	default_params
	{
	    param_named numTiles float2 133.3 100
	    param_named iNumTiles float2 0.00750750 0.01
	    param_named iNumTiles2 float2 0.00375375 0.005
	    param_named lum float4 0.30 0.59 0.11 0.0
	    param_named RT int 0
	    param_named noise int 1
	}
}

fragment_program Ogre/Compositor/HalftoneFPGLSLES glsles
{
	source HalftoneFP.glsles
	syntax glsles
	
	default_params
	{
	    param_named numTiles float2 133.3 100
	    param_named iNumTiles float2 0.00750750 0.01
	    param_named iNumTiles2 float2 0.00375375 0.005
	    param_named lum float4 0.30 0.59 0.11 0.0
	    param_named RT int 0
	    param_named noise int 1
	}
}

fragment_program Ogre/Compositor/HalftoneFP unified
{
	delegate Ogre/Compositor/HalftoneFPGLSL
	delegate Ogre/Compositor/HalftoneFPGLSLES
	delegate Ogre/Compositor/HalftoneFPCg
}

material Ogre/Compositor/Halftone
{
    technique
    {

		pass
		{
			cull_hardware none
			cull_software none
			depth_func always_pass
            polygon_mode_overrideable false

			vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp
			{
			}


			fragment_program_ref Ogre/Compositor/HalftoneFP
			{

			}

			texture_unit RT
			{
                tex_coord_set 0
				tex_address_mode clamp
				filtering trilinear
			}

			texture_unit noise
			{
				texture HalftoneVolume
				tex_coord_set 0
				filtering trilinear
				tex_address_mode clamp
				tex_border_colour 1.0 0.0 0.0
			}

		}
	}
}

