Index: /data/Media/materials/scripts/Bump_Specular.material
===================================================================
--- /data/Media/materials/scripts/Bump_Specular.material	(revision 5136)
+++ /data/Media/materials/scripts/Bump_Specular.material	(revision 5137)
@@ -26,7 +26,7 @@
 			// mixing fixed function and vertex programs, depth fighting can
 			// be an issue
-			vertex_program_ref Ogre/BasicVertexPrograms/AmbientOneTextureGLSL
+			vertex_program_ref Ogre/BasicVertexPrograms/AmbientOneTexture
 			{
-				
+				param_named_auto worldViewProj worldviewproj_matrix
 				param_named_auto ambient ambient_light_colour
 			}
@@ -92,7 +92,7 @@
 			// mixing fixed function and vertex programs, depth fighting can
 			// be an issue
-			vertex_program_ref Ogre/BasicVertexPrograms/AmbientOneTextureGLSL
+			vertex_program_ref Ogre/BasicVertexPrograms/AmbientOneTexture
 			{
-				
+				param_named_auto worldViewProj worldviewproj_matrix
 				param_named ambient float4 1 1 1 1
 			}
@@ -107,6 +107,88 @@
 
 	
-}
+// This is the fallback which cards which don't have fragment program
+	// support will use, NB does not support specular colour
+	// Note that it still requires vertex program support
+	technique
+	{
+		// Base ambient pass
+		pass
+		{
+			// base colours, not needed for rendering, but as information
+			// to lighting pass categorisation routine
+			ambient 1 1 1
+			diffuse 0 0 0
+			specular 0 0 0 0
+			// Really basic vertex program
+			// NB we don't use fixed function here because GL does not like
+			// mixing fixed function and vertex programs, depth fighting can
+			// be an issue
+			vertex_program_ref Ogre/BasicVertexPrograms/AmbientOneTexture
+			{
+				param_named_auto worldViewProj worldviewproj_matrix
+				param_named_auto ambient ambient_light_colour
+			}
+
+		}
+		// Now do the lighting pass
+		// NB we don't do decal texture here because this is repeated per light
+		pass
+		{
+			// base colours, not needed for rendering, but as information
+			// to lighting pass categorisation routine
+			ambient 0 0 0
+			// do this for each light
+			iteration once_per_light
 
 
+			scene_blend add
 
+			// Vertex program reference
+			vertex_program_ref BumpMapVP
+			{
+				param_named_auto lightPosition light_position_object_space 0
+				param_named_auto worldViewProj worldviewproj_matrix
+			}
+
+			// Base bump map
+			texture_unit
+			{
+				texture nmnone.tga
+				colour_op replace
+			}
+			// Normalisation cube map, with dot product on bump map
+			texture_unit
+			{
+				cubic_texture nm.tga combinedUVW
+				tex_coord_set 1
+				tex_address_mode clamp
+				colour_op_ex dotproduct src_texture src_current
+				colour_op_multipass_fallback dest_colour zero
+			}
+		}
+
+		// Decal pass
+		pass
+		{
+			lighting off
+			// Really basic vertex program
+			// NB we don't use fixed function here because GL does not like
+			// mixing fixed function and vertex programs, depth fighting can
+			// be an issue
+			vertex_program_ref Ogre/BasicVertexPrograms/AmbientOneTexture
+			{
+				param_named_auto worldViewProj worldviewproj_matrix
+				param_named ambient float4 1 1 1 1
+			}
+			scene_blend dest_colour zero
+			texture_unit
+			{
+				texture assff.JPG
+			}
+
+		}
+
+	}
+
+
+}
Index: /data/Media/materials/scripts/Examples.program
===================================================================
--- /data/Media/materials/scripts/Examples.program	(revision 5136)
+++ /data/Media/materials/scripts/Examples.program	(revision 5137)
@@ -17,4 +17,14 @@
 	{
 		param_named_auto worldViewProj worldviewproj_matrix
+		param_named_auto ambient ambient_light_colour
+	}
+}
+// A really basic ambient pass program, support for one texture coodinate set
+vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureGLSL glsl
+{
+	source AmbientOneTexture.glsl
+
+	default_params
+	{
 		param_named_auto ambient ambient_light_colour
 	}
Index: /data/Media/materials/scripts/asteroids.material
===================================================================
--- /data/Media/materials/scripts/asteroids.material	(revision 5136)
+++ /data/Media/materials/scripts/asteroids.material	(revision 5137)
@@ -15,14 +15,4 @@
 }
 
-// A really basic ambient pass program, support for one texture coodinate set
-vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureGLSL glsl
-{
-	source AmbientOneTexture.glsl
-
-	default_params
-	{
-		param_named_auto ambient ambient_light_colour
-	}
-}
 
 
@@ -93,5 +83,5 @@
 			{
 				param_named_auto worldViewProj worldviewproj_matrix
-				param_named ambient float3 0.1 0.1 0.1
+				param_named_auto ambient ambient_light_colour
 			}
 
@@ -169,7 +159,91 @@
 		}
 	}
-
-}
-
-
-
+	// This is the fallback which cards which don't have fragment program
+	// support will use, NB does not support specular colour
+	// Note that it still requires vertex program support
+	technique
+	{
+		// Base ambient pass
+		pass
+		{
+			// base colours, not needed for rendering, but as information
+			// to lighting pass categorisation routine
+			ambient 1 1 1
+			diffuse 0 0 0
+			specular 0 0 0 0
+			// Really basic vertex program
+			// NB we don't use fixed function here because GL does not like
+			// mixing fixed function and vertex programs, depth fighting can
+			// be an issue
+			vertex_program_ref Ogre/BasicVertexPrograms/AmbientOneTexture
+			{
+				param_named_auto worldViewProj worldviewproj_matrix
+				param_named_auto ambient ambient_light_colour
+			}
+
+		}
+		// Now do the lighting pass
+		// NB we don't do decal texture here because this is repeated per light
+		pass
+		{
+			// base colours, not needed for rendering, but as information
+			// to lighting pass categorisation routine
+			ambient 0 0 0
+			// do this for each light
+			iteration once_per_light
+
+
+			scene_blend add
+
+			// Vertex program reference
+			vertex_program_ref BumpMapVP
+			{
+				param_named_auto lightPosition light_position_object_space 0
+				param_named_auto worldViewProj worldviewproj_matrix
+			}
+
+			// Base bump map
+			texture_unit
+			{
+				texture nmrock.tga
+				colour_op replace
+			}
+			// Normalisation cube map, with dot product on bump map
+			texture_unit
+			{
+				cubic_texture nm.tga combinedUVW
+				tex_coord_set 1
+				tex_address_mode clamp
+				colour_op_ex dotproduct src_texture src_current
+				colour_op_multipass_fallback dest_colour zero
+			}
+		}
+
+		// Decal pass
+		pass
+		{
+			lighting off
+			// Really basic vertex program
+			// NB we don't use fixed function here because GL does not like
+			// mixing fixed function and vertex programs, depth fighting can
+			// be an issue
+			vertex_program_ref Ogre/BasicVertexPrograms/AmbientOneTexture
+			{
+				param_named_auto worldViewProj worldviewproj_matrix
+				param_named ambient float4 1 1 1 1
+			}
+			scene_blend dest_colour zero
+			texture_unit
+			{
+				texture rock.tga
+			}
+
+		}
+
+	}
+
+
+}
+
+
+
