Index: /data/branches/Shader_HS18/materials/BumpMapping/BumpMap.material
===================================================================
--- /data/branches/Shader_HS18/materials/BumpMapping/BumpMap.material	(revision 12120)
+++ /data/branches/Shader_HS18/materials/BumpMapping/BumpMap.material	(revision 12120)
@@ -0,0 +1,131 @@
+// Any number of lights, diffuse
+material BumpMap_Base
+{
+    technique
+    {
+        // Base ambient pass
+        pass ambient
+        {
+          // base colours, not needed for rendering, but as information
+          // to lighting pass categorisation routine
+          diffuse 0 0 0
+          depth_write on
+          depth_bias 0
+
+        }
+        // Now do the lighting pass
+        // NB we don't do decal texture here because this is repeated per light
+        pass perlight
+        {
+
+            // do this for each light
+            iteration once_per_light
+            scene_blend add
+            depth_write on
+            depth_bias 1
+
+            // base colours, not needed for rendering, but as information
+            // to lighting pass categorisation routine
+            ambient 0 0 0
+
+            // Vertex program reference
+            vertex_program_ref BumpMapping/BumpMapVP
+            {
+                param_named_auto lightPosition light_position_object_space 0
+                param_named_auto worldViewProj worldviewproj_matrix
+            }
+
+            // Fragment program
+            fragment_program_ref BumpMapping/BumpMapFP
+            {
+                param_named_auto lightDiffuse light_diffuse_colour 0
+            }
+
+            // texture shadow receiver program
+            shadow_receiver_vertex_program_ref BumpMapping/BumpMapVPShadowRcv
+            {
+                param_named_auto lightPosition light_position_object_space 0
+                param_named_auto worldViewProj worldviewproj_matrix
+                param_named_auto worldMatrix world_matrix
+                param_named_auto texViewProj texture_viewproj_matrix
+            }
+            // Additive texture shadow receiver program
+            shadow_receiver_fragment_program_ref BumpMapping/BumpMapFPShadowRcv
+            {
+                param_named_auto lightDiffuse light_diffuse_colour 0
+            }
+
+            // Vertex program reference
+            vertex_program_ref BumpMapping/BumpMapVPSpecular
+            {
+                param_named_auto lightPosition light_position_object_space 0
+                param_named_auto eyePosition camera_position_object_space
+                param_named_auto worldViewProj worldviewproj_matrix
+            }
+
+            // Fragment program
+            fragment_program_ref BumpMapping/BumpMapFPSpecular
+            {
+                param_named_auto lightDiffuse light_diffuse_colour 0
+                param_named_auto lightSpecular light_specular_colour 0
+            }
+
+
+            // Base bump map
+            texture_unit normalmap
+            {
+                texture Cube_Lava_NORM.jpg
+                colour_op replace
+            }
+        }
+
+        // Decal pass
+        pass decal
+        {
+            // base colours, not needed for rendering, but as information
+            // to lighting pass categorisation routine
+            lighting off
+            depth_write on
+            depth_bias 2
+
+            scene_blend dest_colour zero
+            texture_unit decalmap
+            {
+                texture Cube_Lava_COLOR.jpg
+            }
+        }
+    }
+}
+
+// Example for Material using this template //
+// import * from "BumpMap.material"
+// // Any number of lights, diffuse
+// material Cube_Lava_Normal : BumpMap_Base
+// {
+//     technique
+//     {
+//         pass ambient
+//         {
+//         }
+//         // Now do the lighting pass
+//         // NB we don't do decal texture here because this is repeated per light
+//         pass perlight
+//         {
+//             // Base bump map
+//             texture_unit normalmap
+//             {
+//                 texture Cube_Lava_NORM.jpg
+//                 colour_op replace
+//             }
+//         }
+
+//         // Decal pass
+//         pass decal
+//         {
+//             texture_unit decalmap
+//             {
+//                 texture Cube_Lava_COLOR.jpg
+//             }
+//         }
+//     }
+// }
Index: ta/branches/Shader_HS18/materials/Cube_Lava_Normal-Mask.material
===================================================================
--- /data/branches/Shader_HS18/materials/Cube_Lava_Normal-Mask.material	(revision 12119)
+++ 	(revision )
@@ -1,57 +1,0 @@
-// Cube_Lava_Normal-Mask genrated by blender2ogre 0.6.0
-
-material Cube_Lava_Normal-Mask 
-{
-    receive_shadows on 
-
-    technique
-    {
-        pass Cube_Lava_Normal-Mask
-        {
-            ambient 0.800000011920929 0.800000011920929 0.800000011920929 1.0
-            diffuse 0.6400000190734865 0.6400000190734865 0.6400000190734865 1.0
-            specular 0.5 0.5 0.5 1.0 12.5
-            emissive 0.0 0.0 0.0 1.0
-
-            alpha_to_coverage off
-            colour_write on
-            cull_hardware clockwise
-            depth_check on
-            depth_func less_equal
-            depth_write on
-            illumination_stage 
-            light_clip_planes off
-            light_scissor off
-            lighting on
-            normalise_normals off
-            polygon_mode solid
-            scene_blend one zero
-            scene_blend_op add
-            shading gouraud
-            transparent_sorting on
-
-            texture_unit 
-            {
-                texture Cube_Lava_COLOR.jpg
-                tex_address_mode wrap
-                scale 1.0 1.0
-                colour_op modulate
-            }
-            texture_unit 
-            {
-                texture Cube_Lava_NORM.jpg
-                tex_address_mode wrap
-                scale 1.0 1.0
-                colour_op modulate
-            }
-            texture_unit 
-            {
-                texture Cube_Lava_MASK.jpg
-                tex_address_mode wrap
-                scale 1.0 1.0
-                scroll_anim 1.0 1.0 
-                colour_op modulate
-            }
-        }
-    }
-}
Index: /data/branches/Shader_HS18/materials/Cube_Lava_Normal.material
===================================================================
--- /data/branches/Shader_HS18/materials/Cube_Lava_Normal.material	(revision 12119)
+++ /data/branches/Shader_HS18/materials/Cube_Lava_Normal.material	(revision 12120)
@@ -1,16 +1,10 @@
+import * from "BumpMap.material"
 // Any number of lights, diffuse
-material Cube_Lava_Normal
+material Cube_Lava_Normal : BumpMap_Base
 {
     technique
     {
-        // Base ambient pass
         pass ambient
         {
-          // base colours, not needed for rendering, but as information
-          // to lighting pass categorisation routine
-          diffuse 0 0 0
-          depth_write on
-          depth_bias 0
-
         }
         // Now do the lighting pass
@@ -18,58 +12,4 @@
         pass perlight
         {
-
-            // do this for each light
-            iteration once_per_light
-            scene_blend add
-            depth_write on
-            depth_bias 1
-
-            // base colours, not needed for rendering, but as information
-            // to lighting pass categorisation routine
-            ambient 0 0 0
-
-            // Vertex program reference
-            vertex_program_ref BumpMapping/BumpMapVP
-            {
-                param_named_auto lightPosition light_position_object_space 0
-                param_named_auto worldViewProj worldviewproj_matrix
-            }
-
-            // Fragment program
-            fragment_program_ref BumpMapping/BumpMapFP
-            {
-                param_named_auto lightDiffuse light_diffuse_colour 0
-            }
-
-            // texture shadow receiver program
-            shadow_receiver_vertex_program_ref BumpMapping/BumpMapVPShadowRcv
-            {
-                param_named_auto lightPosition light_position_object_space 0
-                param_named_auto worldViewProj worldviewproj_matrix
-                param_named_auto worldMatrix world_matrix
-                param_named_auto texViewProj texture_viewproj_matrix
-            }
-            // Additive texture shadow receiver program
-            shadow_receiver_fragment_program_ref BumpMapping/BumpMapFPShadowRcv
-            {
-                param_named_auto lightDiffuse light_diffuse_colour 0
-            }
-
-            // Vertex program reference
-            vertex_program_ref BumpMapping/BumpMapVPSpecular
-            {
-                param_named_auto lightPosition light_position_object_space 0
-                param_named_auto eyePosition camera_position_object_space
-                param_named_auto worldViewProj worldviewproj_matrix
-            }
-
-            // Fragment program
-            fragment_program_ref BumpMapping/BumpMapFPSpecular
-            {
-                param_named_auto lightDiffuse light_diffuse_colour 0
-                param_named_auto lightSpecular light_specular_colour 0
-            }
-
-
             // Base bump map
             texture_unit normalmap
@@ -83,11 +23,4 @@
         pass decal
         {
-            // base colours, not needed for rendering, but as information
-            // to lighting pass categorisation routine
-            lighting off
-            depth_write on
-            depth_bias 2
-
-            scene_blend dest_colour zero
             texture_unit decalmap
             {
Index: /data/branches/Shader_HS18/materials/Cube_Lava_Normal_Blank.material
===================================================================
--- /data/branches/Shader_HS18/materials/Cube_Lava_Normal_Blank.material	(revision 12120)
+++ /data/branches/Shader_HS18/materials/Cube_Lava_Normal_Blank.material	(revision 12120)
@@ -0,0 +1,31 @@
+import * from "BumpMap.material"
+// Any number of lights, diffuse
+material Cube_Lava_Normal_Blank : BumpMap_Base
+{
+    technique
+    {
+        pass ambient
+        {
+        }
+        // Now do the lighting pass
+        // NB we don't do decal texture here because this is repeated per light
+        pass perlight
+        {
+            // Base bump map
+            texture_unit normalmap
+            {
+                texture Cube_Lava_NORM.jpg
+                colour_op replace
+            }
+        }
+
+        // Decal pass
+        pass decal
+        {
+            texture_unit decalmap
+            {
+                colour_op_ex source1 src_manual src_current 0.8 0.8 0.8
+            }
+        }
+    }
+}
