// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
material ppx_render			// per pixel  colored and normal only
{
	receive_shadows off
	set $ambientCol "1 1 1 1"
	set $diffuseCol "1 1 1 1"
	set $specularCol "1 1 1"
	set $shininess "32"
	set $depthBias "0"
	set $cull "none"  //"clockwise"
 
	technique
	{
		pass
		{
			ambient $ambientCol
			diffuse $diffuseCol
			specular $specularCol $shininess
 
			cull_hardware $cull
			depth_bias $depthBias

			vertex_program_ref render_vs  {  }
			fragment_program_ref render_ps  {  }
 		}
	}
}

material ppx_render_gr		// per pixel  for grass
{
	receive_shadows off
	set $depthBias "0"
	set $cull "clockwise"
 
	technique
	{
		pass
		{
			cull_hardware $cull
			depth_bias $depthBias
			scene_blend  alpha_blend
			transparent_sorting on
			//depth_write off
			depth_check off

			vertex_program_ref render_vs  {  }
			fragment_program_ref render_gr_ps {  }
 		}
	}
}


material car_body
{
	technique
	{
		pass
		{
			ambient 0.5 0.5 0.5
			diffuse 1.0 1.0 1.0
			specular 0.7 0.7 0.7 32
		
			texture_unit diffuseMap
			{
				texture body_dyn.png
			}
		}
	}
}


//  road render to texture
//------------------------------------------------------------

material render_clr : ppx_render
{
	set $ambientCol  "0.0 0.0 0.0"
	set $diffuseCol  "0.7 0.7 0.7"
	set $depthBias "3"
}

material render_grass : ppx_render_gr
{
	set $depthBias "3"
}

material road_mini
{
	receive_shadows off
	technique
	{
		pass
		{
			lighting off
			texture_unit
			{
				texture RttTex
			}
		}
	}
}

material mtSCBLIGHT  //sphere
{
	receive_shadows off
	technique
	{
		pass
		{
			lighting off
		}
	}
}

material nx.cube
{
	receive_shadows off
	technique
	{
		pass
		{
			lighting off
		}
	}
}


//  brush preview tex
//material BrushPrvMtr
//{
//	receive_shadows off
//	technique
//	{
//		pass
//		{
//			scene_blend alpha_blend
//			lighting off
//			depth_check off
//			depth_write off
//
//			texture_unit diffuseMap
//			{
//				texture BrushPrvTex
//			}
//		}
//	}
//}
//


//  mini   ------------------------
material road_mini_0
{
	technique
	{
		pass
		{
			lighting off
			depth_check off
			depth_write off

			texture_unit diffuseMap
			{
				texture RttTex0
			}
		}
	}
}
material road_mini_1
{
	technique
	{
		pass
		{
			lighting off
			depth_check off
			depth_write off

			texture_unit diffuseMap
			{
				texture RttTex1
			}
		}
	}
}
material road_mini_2
{
	technique
	{
		pass
		{
			lighting off
			depth_check off
			depth_write off

			texture_unit diffuseMap
			{
				texture RttTex2
			}
		}
	}
}
material road_mini_4
{
	technique
	{
		pass
		{
			lighting off
			depth_check off
			depth_write off

			texture_unit diffuseMap
			{
				texture RttTex3
			}
		}
	}
}
material road_mini_3
{
	technique
	{
		pass
		{
			lighting off
			depth_check off
			depth_write off

			vertex_program_ref rnd_vs  {  }
			fragment_program_ref rnd_add_ps  {  }

			texture_unit diffuseAdd
			{
				texture RttTex0
			}
			texture_unit diffuseMap
			{
				texture RttTex2
			}
		}
	}
}
