Index: data/media/materials/scripts/BlackAndWhite.material
===================================================================
--- data/media/materials/scripts/BlackAndWhite.material	(revision 5312)
+++ data/media/materials/scripts/BlackAndWhite.material	(revision 5312)
@@ -0,0 +1,34 @@
+fragment_program Ogre/Compositor/B&W_FP cg
+{
+	source GrayScale.cg
+	entry_point GrayScale_ps
+	profiles ps_2_0 arbfp1
+}
+
+material Ogre/Compositor/BlackAndWhite
+{
+	technique
+	{
+
+		pass
+		{
+			depth_check off
+
+			vertex_program_ref Ogre/Compositor/StdQuad_Cg_vp
+			{
+			}
+
+			fragment_program_ref Ogre/Compositor/B&W_FP
+			{
+			}
+
+			texture_unit
+			{
+				texture RT
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering linear linear linear
+			}
+		}
+	}
+}
Index: data/media/materials/scripts/Embossed.material
===================================================================
--- data/media/materials/scripts/Embossed.material	(revision 5312)
+++ data/media/materials/scripts/Embossed.material	(revision 5312)
@@ -0,0 +1,33 @@
+fragment_program Ogre/Compositor/Embossed_FP cg
+{
+	source GrayScale.cg
+	entry_point Embossed_ps
+	profiles ps_2_0 arbfp1
+}
+
+material Ogre/Compositor/Embossed
+{
+	technique
+	{
+
+		pass
+		{
+			depth_check off
+
+			vertex_program_ref Ogre/Compositor/StdQuad_Cg_vp
+			{
+			}
+
+			fragment_program_ref Ogre/Compositor/Embossed_FP
+			{
+			}
+
+			texture_unit RT
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering linear linear linear
+			}
+		}
+	}
+}
Index: data/media/materials/scripts/Examples.compositor
===================================================================
--- data/media/materials/scripts/Examples.compositor	(revision 5303)
+++ data/media/materials/scripts/Examples.compositor	(revision 5312)
@@ -1,136 +1,2 @@
-// Manuel's bloom
-// Needs a scene-sized rtt, but does only one render of the scene
-compositor Bloom
-{
-    technique
-    {
-        // Temporary textures
-        texture rt0 128 128 PF_A8R8G8B8
-        texture rt1 128 128 PF_A8R8G8B8
-
-        target rt1
-        {
-            // Render output from previous compositor (or original scene)
-            input previous
-        }
-
-        target rt0
-        {
-            // Start with clear texture
-            input none
-            // Vertical blur pass
-            pass render_quad
-            {
-                // Renders a fullscreen quad with a material
-                material Ogre/Compositor/Blur0
-                input 0 rt1
-            }
-        }
-
-        target rt1
-        {
-            // Start with clear texture
-            input none
-            // Horizontal blur pass
-            pass render_quad
-            {
-                // Renders a fullscreen quad with a material
-                material Ogre/Compositor/Blur1
-                input 0 rt0
-            }
-        }
-
-        target_output
-        {
-            // Start with clear output
-            input previous
-            // Draw a fullscreen quad
-            pass render_quad
-            {
-                // Renders a fullscreen quad with a material
-                material Ogre/Compositor/BloomBlend
-                input 0 rt1
-            }
-        }
-    }
-}
-
-compositor Glass
-{
-    technique
-    {
-        texture rt0 target_width target_height PF_R8G8B8
-
-        target rt0 { input previous }
-
-        target_output
-        {
-            // Start with clear output
-            input none
-
-            pass render_quad
-            {
-                material Ogre/Compositor/GlassPass
-                input 0 rt0
-            }
-        }
-    }
-}
-
-compositor "Old TV"
-{
-    technique
-    {
-        texture rt0 target_width target_height PF_R8G8B8
-
-        // render scene to a texture
-        target rt0 { input previous }
-
-        target_output
-        {
-            // Start with clear output
-            input none
-
-            pass render_quad
-            {
-                // convert the previous render target to a black and white image, add some noise, distort it,
-                // then render to scene aligned quad
-                material Ogre/Compositor/OldTV
-                input 0 rt0
-            }
-        }
-    }
-}
-
-
-// Black and white effect
-compositor B&W
-{
-    technique
-    {
-        // Temporary textures
-        texture rt0 target_width target_height PF_A8R8G8B8
-
-        target rt0
-        {
-            // Render output from previous compositor (or original scene)
-            input previous
-        }
-
-        target_output
-        {
-            // Start with clear output
-            input none
-            // Draw a fullscreen quad with the black and white image
-            pass render_quad
-            {
-                // Renders a fullscreen quad with a material
-                material Ogre/Compositor/BlackAndWhite
-                input 0 rt0
-            }
-        }
-    }
-}
-
 //compositor DOF // based on Blur but final pass does depth of field
 //{
@@ -189,207 +55,4 @@
 //}
 
-// Embossed (fake bump) effect
-compositor Embossed
-{
-    technique
-    {
-        // Temporary textures
-        texture rt0 target_width target_height PF_A8R8G8B8
-
-        target rt0
-        {
-            // Render output from previous compositor (or original scene)
-            input previous
-        }
-
-        target_output
-        {
-            // Start with clear output
-            input none
-            // Draw a fullscreen quad with the black and white image
-            pass render_quad
-            {
-                // Renders a fullscreen quad with a material
-                material Ogre/Compositor/Embossed
-                input 0 rt0
-            }
-        }
-    }
-}
-
-// SharpenEdges
-compositor Sharpen Edges
-{
-    technique
-    {
-        // Temporary textures
-        texture rt0 target_width target_height PF_A8R8G8B8
-
-        target rt0
-        {
-            // Render output from previous compositor (or original scene)
-            input previous
-        }
-
-        target_output
-        {
-            // Start with clear output
-            input none
-            // Draw a fullscreen quad with the black and white image
-            pass render_quad
-            {
-                // Renders a fullscreen quad with a material
-                material Ogre/Compositor/SharpenEdges
-                input 0 rt0
-            }
-        }
-    }
-}
-
-// Invert
-compositor Invert
-{
-    technique
-    {
-        // Temporary textures
-        texture rt0 target_width target_height PF_A8R8G8B8
-
-        target rt0
-        {
-            // Render output from previous compositor (or original scene)
-            input previous
-        }
-
-        target_output
-        {
-            // Start with clear output
-            input none
-            // Draw a fullscreen quad with the black and white image
-            pass render_quad
-            {
-                // Renders a fullscreen quad with a material
-                material Ogre/Compositor/Invert
-                input 0 rt0
-            }
-        }
-    }
-}
-
-// Posterize
-compositor Posterize
-{
-    technique
-    {
-        // Temporary textures
-        texture rt0 target_width target_height PF_A8R8G8B8
-
-        target rt0
-        {
-            // Render output from previous compositor (or original scene)
-            input previous
-        }
-
-        target_output
-        {
-            // Start with clear output
-            input none
-            // Draw a fullscreen quad with the black and white image
-            pass render_quad
-            {
-                // Renders a fullscreen quad with a material
-                material Ogre/Compositor/Posterize
-                input 0 rt0
-            }
-        }
-    }
-}
-
-// Laplace
-compositor Laplace
-{
-    technique
-    {
-        // Temporary textures
-        texture rt0 target_width target_height PF_A8R8G8B8
-
-        target rt0
-        {
-            // Render output from previous compositor (or original scene)
-            input previous
-        }
-
-        target_output
-        {
-            // Start with clear output
-            input none
-            // Draw a fullscreen quad with the black and white image
-            pass render_quad
-            {
-                // Renders a fullscreen quad with a material
-                material Ogre/Compositor/Laplace
-                input 0 rt0
-            }
-        }
-    }
-}
-
-// Tiling
-compositor Tiling
-{
-    technique
-    {
-        // Temporary textures
-        texture rt0 target_width target_height PF_A8R8G8B8
-
-        target rt0
-        {
-            // Render output from previous compositor (or original scene)
-            input previous
-        }
-
-        target_output
-        {
-            // Start with clear output
-            input none
-            // Draw a fullscreen quad with the black and white image
-            pass render_quad
-            {
-                // Renders a fullscreen quad with a material
-                material Ogre/Compositor/Tiling
-                input 0 rt0
-            }
-        }
-    }
-}
-
-// Old Movie
-compositor Old Movie
-{
-    technique
-    {
-        // Temporary textures
-        texture rt0 target_width target_height PF_A8R8G8B8
-
-        target rt0
-        {
-            // Render output from previous compositor (or original scene)
-            input previous
-        }
-
-        target_output
-        {
-            // Start with clear output
-            input none
-            // Draw a fullscreen quad with the black and white image
-            pass render_quad
-            {
-                // Renders a fullscreen quad with a material
-                material Ogre/Compositor/OldMovie
-                input 0 rt0
-            }
-        }
-    }
-}
-
 // HDR
 compositor HDR
@@ -400,5 +63,5 @@
         // Temporary textures
 		// Fullsize HDR render target, used as tone mapping source
-        texture rt_full target_width target_height PF_FLOAT16_RGB
+		texture rt_full target_width target_height PF_FLOAT16_RGB
 		// Targets used for luminance evaluation (3x3 downsample, point filtering)
 		texture rt_lum0 1 1 PF_FLOAT16_RGB
@@ -449,5 +112,5 @@
             pass render_quad
             {
-				// Downsample using a 3x3 filter
+                // Downsample using a 3x3 filter
                 material Ogre/Compositor/HDR/Downsample3x3
                 input 0 rt_lum4
@@ -492,13 +155,13 @@
 		target rt_brightpass
 		{
-            input none
-            pass render_quad
-            {
-                // Downsample using a 3x3 filter, hi-pass and tone map
-                material Ogre/Compositor/HDR/Downsample3x3Brightpass
-                input 0 rt_full
-		        input 1 rt_lum0
+			input none
+			pass render_quad
+			{
+				// Downsample using a 3x3 filter, hi-pass and tone map
+				material Ogre/Compositor/HDR/Downsample3x3Brightpass
+				input 0 rt_full
+				input 1 rt_lum0
 				identifier 800
-            }
+			}
 		}
 
@@ -541,52 +204,4 @@
 			}
 		}
-
-
 	}
-
 }
-
-
-// Gaussian blur effect
-compositor Gaussian Blur
-{
-    technique
-    {
-        // Temporary textures
-        texture rt0 target_width target_height PF_A8R8G8B8
-        texture rt1 target_width target_height PF_A8R8G8B8
-
-        target rt0
-        {
-            // Render output from previous compositor (or original scene)
-            input previous
-        }
-
-        target rt1
-        {
-            // Blur horizontally
-            input none
-			pass render_quad
-			{
-				material Ogre/Compositor/HDR/GaussianBloom
-				input 0 rt0
-				identifier 700
-			}
-        }
-
-		target_output
-        {
-            // Start with clear output
-            input none
-            // Blur vertically
-            pass render_quad
-            {
-                // Renders a fullscreen quad with a material
-				material Ogre/Compositor/HDR/GaussianBloom
-                input 0 rt1
-				identifier 701
-            }
-        }
-    }
-}
-
Index: data/media/materials/scripts/Glass.material
===================================================================
--- data/media/materials/scripts/Glass.material	(revision 5312)
+++ data/media/materials/scripts/Glass.material	(revision 5312)
@@ -0,0 +1,40 @@
+fragment_program Ogre/Compositor/GlassFP cg
+{
+	source GlassFP.cg
+	entry_point main_ps
+	profiles ps_2_0 arbfp1
+}
+
+material Ogre/Compositor/GlassPass
+{
+	technique
+	{
+		pass
+		{
+			depth_check off
+
+			vertex_program_ref Ogre/Compositor/StdQuad_Cg_vp
+			{
+			}
+
+			fragment_program_ref Ogre/Compositor/GlassFP
+			{
+			}
+
+			texture_unit RT
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering linear linear linear
+			}
+
+			texture_unit
+			{
+				texture WaterNormal1.tga 2d
+				tex_coord_set 1
+				//tex_address_mode clamp
+				filtering linear linear linear
+			}
+		}
+	}
+}
Index: data/media/materials/scripts/Invert.material
===================================================================
--- data/media/materials/scripts/Invert.material	(revision 5312)
+++ data/media/materials/scripts/Invert.material	(revision 5312)
@@ -0,0 +1,36 @@
+fragment_program Ogre/Compositor/InvertFP cg
+{
+	source InvertFP.cg
+	entry_point Invert_ps
+	profiles ps_2_0 arbfp1
+}
+
+material Ogre/Compositor/Invert
+{
+	technique
+	{
+
+		pass
+		{
+			cull_hardware none
+			cull_software none
+			depth_func always_pass
+
+			vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp
+			{
+			}
+
+			fragment_program_ref Ogre/Compositor/InvertFP
+			{
+			}
+
+			texture_unit RT
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering trilinear
+			}
+
+		}
+	}
+}
Index: data/media/materials/scripts/Laplace.material
===================================================================
--- data/media/materials/scripts/Laplace.material	(revision 5312)
+++ data/media/materials/scripts/Laplace.material	(revision 5312)
@@ -0,0 +1,39 @@
+fragment_program Ogre/Compositor/LaplaceFP cg
+{
+	source LaplaceFP.cg
+	entry_point Laplace_ps
+	profiles ps_2_0 arbfp1
+}
+
+material Ogre/Compositor/Laplace
+{
+    technique
+    {
+
+		pass
+		{
+			cull_hardware none
+			cull_software none
+			depth_func always_pass
+
+			vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp
+			{
+			}
+
+			fragment_program_ref Ogre/Compositor/LaplaceFP
+			{
+				param_named pixelSize float 0.0031
+				param_named scale float 1.0
+			}
+
+
+			texture_unit RT
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering trilinear
+			}
+
+		}
+	}
+}
Index: data/media/materials/scripts/OldMovie.material
===================================================================
--- data/media/materials/scripts/OldMovie.material	(revision 5312)
+++ data/media/materials/scripts/OldMovie.material	(revision 5312)
@@ -0,0 +1,67 @@
+fragment_program Ogre/Compositor/OldMovieFP cg
+{
+	source OldMovieFP.cg
+	entry_point OldMovie_ps
+	profiles ps_2_0 arbfp1
+}
+
+material Ogre/Compositor/OldMovie
+{
+    technique
+    {
+
+		pass
+		{
+			cull_hardware none
+			cull_software none
+			depth_func always_pass
+
+			vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp
+			{
+			}
+
+			fragment_program_ref Ogre/Compositor/OldMovieFP
+			{
+				param_named_auto time_cycle_period time 20
+				param_named flicker float 0.4
+				param_named DirtFrequency float 0.0005
+				param_named luminance float3 0.30 0.59 0.11
+				param_named frameJitter float 0.004
+				param_named lumiShift float 0.03
+			}
+
+			texture_unit RT
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering trilinear
+			}
+
+			texture_unit SplotchesTx
+			{
+				texture 8x8PagesSplotches2.png 2d
+				tex_coord_set 1
+				tex_address_mode wrap
+				filtering trilinear
+			}
+
+			texture_unit
+			{
+				texture 1D_Noise.png 1d
+				tex_coord_set 2
+				tex_address_mode wrap
+				filtering point point none
+			}
+
+
+			texture_unit SepiaTx
+			{
+				texture Sepia1D.tga 1d
+				tex_coord_set 3
+				tex_address_mode mirror
+				filtering point point none
+			}
+
+		}
+	}
+}
Index: data/media/materials/scripts/OldTV.material
===================================================================
--- data/media/materials/scripts/OldTV.material	(revision 5312)
+++ data/media/materials/scripts/OldTV.material	(revision 5312)
@@ -0,0 +1,59 @@
+fragment_program Ogre/Compositor/OldTV_FP cg
+{
+	source OldTV.cg
+	entry_point OldTV_ps
+	profiles ps_2_0 arbfp1
+}
+
+material Ogre/Compositor/OldTV
+{
+	technique
+	{
+
+		pass
+		{
+			depth_check off
+
+			vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp
+			{
+			}
+
+			fragment_program_ref Ogre/Compositor/OldTV_FP
+			{
+				param_named_auto time_0_X time_0_x 120
+				param_named_auto sin_time_0_X sintime_0_x 120
+
+				param_named distortionFreq float 2.7
+				param_named distortionScale float 2.5
+				param_named distortionRoll float 0.93
+				param_named interference float 0.5
+				param_named frameLimit float 0.40
+				param_named frameShape float 0.26
+				param_named frameSharpness float 6.0
+			}
+
+			texture_unit 0
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering linear linear linear
+			}
+
+			texture_unit 1
+			{
+				texture Random3D.dds 3d
+				tex_coord_set 1
+				tex_address_mode wrap
+				filtering linear linear linear
+			}
+
+			texture_unit 2
+			{
+				texture NoiseVolume.dds 3d
+				tex_coord_set 2
+				tex_address_mode wrap
+				filtering linear linear linear
+			}
+		}
+	}
+}
Index: data/media/materials/scripts/Posterize.material
===================================================================
--- data/media/materials/scripts/Posterize.material	(revision 5312)
+++ data/media/materials/scripts/Posterize.material	(revision 5312)
@@ -0,0 +1,36 @@
+fragment_program Ogre/Compositor/PosterizeFP cg
+{
+	source PosterizeFP.cg
+	entry_point Posterize_ps
+	profiles ps_2_0 arbfp1
+}
+
+material Ogre/Compositor/Posterize
+{
+    technique
+    {
+
+		pass
+		{
+			cull_hardware none
+			cull_software none
+			depth_func always_pass
+
+			vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp
+			{
+			}
+
+			fragment_program_ref Ogre/Compositor/PosterizeFP
+			{
+			}
+
+			texture_unit RT
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering trilinear
+			}
+
+		}
+	}
+}
Index: data/media/materials/scripts/RadialBlur.material
===================================================================
--- data/media/materials/scripts/RadialBlur.material	(revision 5312)
+++ data/media/materials/scripts/RadialBlur.material	(revision 5312)
@@ -0,0 +1,36 @@
+//Cg Pixel Shader ps_2_0
+fragment_program Radial_Blur_ps_cg cg
+{
+	source Radial_Blur_FP.cg
+	profiles ps_2_0 arbfp1
+	entry_point main
+
+}
+
+
+//Effect: Radial Blur
+material Ogre/Compositor/Radial_Blur
+{
+	technique
+	{
+		pass
+		{
+			//State: D3DRS_CULLMODE, Value : D3DCULL_NONE
+			cull_hardware none
+			cull_software none
+			depth_check off
+
+			fragment_program_ref Radial_Blur_ps_cg
+			{
+				param_named sampleDist float 0.5
+				param_named sampleStrength float 2.2
+			}
+			texture_unit
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering trilinear
+			}
+		}
+	}
+}
Index: data/media/materials/scripts/Shaders.compositor
===================================================================
--- data/media/materials/scripts/Shaders.compositor	(revision 5312)
+++ data/media/materials/scripts/Shaders.compositor	(revision 5312)
@@ -0,0 +1,399 @@
+// Manuel's bloom
+// Needs a scene-sized rtt, but does only one render of the scene
+compositor Bloom
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 128 128 PF_A8R8G8B8
+        texture rt1 128 128 PF_A8R8G8B8
+
+        target rt1
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target rt0
+        {
+            // Start with clear texture
+            input none
+            // Vertical blur pass
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/Blur0
+                input 0 rt1
+            }
+        }
+
+        target rt1
+        {
+            // Start with clear texture
+            input none
+            // Horizontal blur pass
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/Blur1
+                input 0 rt0
+            }
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input previous
+            // Draw a fullscreen quad
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/BloomBlend
+                input 0 rt1
+            }
+        }
+    }
+}
+
+compositor Glass
+{
+    technique
+    {
+        texture rt0 target_width target_height PF_R8G8B8
+
+        target rt0 { input previous }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+
+            pass render_quad
+            {
+                material Ogre/Compositor/GlassPass
+                input 0 rt0
+            }
+        }
+    }
+}
+
+// Black and white effect
+compositor BW
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Draw a fullscreen quad with the black and white image
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/BlackAndWhite
+                input 0 rt0
+            }
+        }
+    }
+}
+
+compositor Tiling
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Draw a fullscreen quad with the black and white image
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/Tiling
+                input 0 rt0
+            }
+        }
+    }
+}
+
+// Embossed (fake bump) effect
+compositor Embossed
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Draw a fullscreen quad with the black and white image
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/Embossed
+                input 0 rt0
+            }
+        }
+    }
+}
+
+compositor Sharpen Edges
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Draw a fullscreen quad with the black and white image
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/SharpenEdges
+                input 0 rt0
+            }
+        }
+    }
+}
+
+compositor Invert
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Draw a fullscreen quad with the black and white image
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/Invert
+                input 0 rt0
+            }
+        }
+    }
+}
+
+compositor Posterize
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Draw a fullscreen quad with the black and white image
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/Posterize
+                input 0 rt0
+            }
+        }
+    }
+}
+
+compositor Laplace
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Draw a fullscreen quad with the black and white image
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/Laplace
+                input 0 rt0
+            }
+        }
+    }
+}
+
+compositor "Old TV"
+{
+    technique
+    {
+        texture rt0 target_width target_height PF_R8G8B8
+
+        // render scene to a texture
+        target rt0 { input previous }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+
+            pass render_quad
+            {
+                // convert the previous render target to a black and white image, add some noise, distort it,
+                // then render to scene aligned quad
+                material Ogre/Compositor/OldTV
+                input 0 rt0
+            }
+        }
+    }
+}
+
+compositor Old Movie
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Draw a fullscreen quad with the black and white image
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/OldMovie
+                input 0 rt0
+            }
+        }
+    }
+}
+
+compositor Gaussian Blur
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+        texture rt1 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target rt1
+        {
+            // Blur horizontally
+            input none
+            pass render_quad
+            {
+                material Ogre/Compositor/HDR/GaussianBloom
+                input 0 rt0
+                identifier 700
+            }
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Blur vertically
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/HDR/GaussianBloom
+                input 0 rt1
+                identifier 701
+            }
+        }
+    }
+}
+
+compositor Radial Blur
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Blur vertically
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/Radial_Blur
+                input 0 rt0
+            }
+        }
+    }
+}
Index: data/media/materials/scripts/SharpenEdges.material
===================================================================
--- data/media/materials/scripts/SharpenEdges.material	(revision 5312)
+++ data/media/materials/scripts/SharpenEdges.material	(revision 5312)
@@ -0,0 +1,60 @@
+fragment_program Ogre/Compositor/SharpenEdgesFP_cg cg
+{
+	source SharpenEdgesFP.cg
+	entry_point sharpenEdges_fp
+	profiles ps_2_0 arbfp1
+}
+
+fragment_program Ogre/Compositor/SharpenEdgesFP_ps_2_a hlsl
+{
+	source SharpenEdgesFP.cg
+	entry_point sharpenEdges_fp
+	target ps_2_a
+}
+
+fragment_program Ogre/Compositor/SharpenEdgesFP unified
+{
+	delegate Ogre/Compositor/SharpenEdgesFP_ps_2_a
+	delegate Ogre/Compositor/SharpenEdgesFP_cg
+
+	default_params
+	{
+		param_named_auto vTexelSize inverse_texture_size 0
+	}
+}
+
+material Ogre/Compositor/SharpenEdges
+{
+    technique
+    {
+
+		pass
+		{
+			cull_hardware none
+			cull_software none
+			depth_func always_pass
+
+			//DirectX 9.0 HLSL Vertex Shader vs_1_1
+			//vertex_program_ref PostFilters/SharpenEdgesVP
+			//{
+			//}
+
+			vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp
+			{
+			}
+
+			//DirectX 9.0 HLSL Pixel Shader ps_2_0
+			fragment_program_ref Ogre/Compositor/SharpenEdgesFP
+			{
+			}
+
+			texture_unit
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering trilinear
+			}
+
+		}
+	}
+}
Index: data/media/materials/scripts/Tiling.material
===================================================================
--- data/media/materials/scripts/Tiling.material	(revision 5312)
+++ data/media/materials/scripts/Tiling.material	(revision 5312)
@@ -0,0 +1,39 @@
+fragment_program Ogre/Compositor/TilingFP cg
+{
+	source TilingFP.cg
+	entry_point Tiling_ps
+	profiles ps_2_0 arbfp1
+}
+
+material Ogre/Compositor/Tiling
+{
+    technique
+    {
+
+		pass
+		{
+			cull_hardware none
+			cull_software none
+			depth_func always_pass
+
+			vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp
+			{
+			}
+
+			//DirectX 9.0 HLSL Pixel Shader ps_2_0
+			fragment_program_ref Ogre/Compositor/TilingFP
+			{
+				param_named NumTiles float 75.0
+				param_named Threshhold float 0.15
+			}
+
+			texture_unit RT
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering trilinear
+			}
+
+		}
+	}
+}
Index: data/media/materials/scripts/hdr.material
===================================================================
--- data/media/materials/scripts/hdr.material	(revision 5312)
+++ data/media/materials/scripts/hdr.material	(revision 5312)
@@ -0,0 +1,286 @@
+// Downsample a 2x2 area & turn into luminence (unclamped)
+fragment_program Ogre/Compositor/HDR/downscale2x2LuminenceHLSL_fp hlsl
+{
+	source hdr.hlsl
+	entry_point downscale2x2Luminence
+	target ps_2_0
+}
+fragment_program Ogre/Compositor/HDR/downscale2x2LuminenceGLSL_fp glsl
+{
+	source hdr_downscale2x2luminence.glsl
+	default_params
+	{
+		param_named inRTT int 0
+	}
+}
+fragment_program Ogre/Compositor/HDR/downscale2x2Luminence_fp unified
+{
+	delegate Ogre/Compositor/HDR/downscale2x2LuminenceGLSL_fp
+	delegate Ogre/Compositor/HDR/downscale2x2LuminenceHLSL_fp
+	default_params
+	{
+	    param_named_auto texelSize inverse_texture_size 0
+	}
+}
+
+material Ogre/Compositor/HDR/Downsample2x2Luminence
+{
+	technique
+	{
+		pass
+		{
+			cull_hardware none
+			cull_software none
+			depth_check off
+
+			vertex_program_ref Ogre/Compositor/StdQuad_vp
+			{
+			}
+			fragment_program_ref Ogre/Compositor/HDR/downscale2x2Luminence_fp
+			{
+			}
+
+			texture_unit
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering none 
+			}
+		}
+	}
+}
+
+// Downsample a 3x3 area
+fragment_program Ogre/Compositor/HDR/downscale3x3HLSL_fp hlsl
+{
+	source hdr.hlsl
+	entry_point downscale3x3
+	target ps_2_0
+}
+fragment_program Ogre/Compositor/HDR/downscale3x3GLSL_fp glsl
+{
+	source hdr_downscale3x3.glsl
+	default_params
+	{
+		param_named inRTT int 0
+	}
+}
+fragment_program Ogre/Compositor/HDR/downscale3x3_fp unified
+{
+	delegate Ogre/Compositor/HDR/downscale3x3GLSL_fp
+	delegate Ogre/Compositor/HDR/downscale3x3HLSL_fp
+	default_params
+	{
+	    param_named_auto texelSize inverse_texture_size 0
+	}
+}
+
+
+material Ogre/Compositor/HDR/Downsample3x3
+{
+	technique
+	{
+		pass
+		{
+			cull_hardware none
+			cull_software none
+			depth_check off
+
+			vertex_program_ref Ogre/Compositor/StdQuad_vp
+			{
+			}
+			fragment_program_ref Ogre/Compositor/HDR/downscale3x3_fp
+			{
+			}
+
+			texture_unit
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering none 
+			}
+		}
+	}
+}
+
+// Downsample a 3x3 area and perform a brightness filter pass
+fragment_program Ogre/Compositor/HDR/downscale3x3brightpassHLSL_fp hlsl
+{
+	source hdr.hlsl
+	entry_point downscale3x3brightpass
+	target ps_2_0
+}
+fragment_program Ogre/Compositor/HDR/utils_fp glsl
+{
+	source hdr_tonemap_util.glsl
+}
+fragment_program Ogre/Compositor/HDR/downscale3x3brightpassGLSL_fp glsl
+{
+	source hdr_downscale3x3brightpass.glsl
+	// re-use common functions
+	attach Ogre/Compositor/HDR/utils_fp
+	default_params
+	{
+		param_named inRTT int 0
+		param_named inLum int 1
+	}
+}
+fragment_program Ogre/Compositor/HDR/downscale3x3brightpass_fp unified
+{
+	delegate Ogre/Compositor/HDR/downscale3x3brightpassGLSL_fp
+	delegate Ogre/Compositor/HDR/downscale3x3brightpassHLSL_fp
+	default_params
+	{
+	    param_named_auto texelSize inverse_texture_size 0
+	}
+}
+
+
+material Ogre/Compositor/HDR/Downsample3x3Brightpass
+{
+	technique
+	{
+		pass
+		{
+			cull_hardware none
+			cull_software none
+			depth_check off
+
+			vertex_program_ref Ogre/Compositor/StdQuad_vp
+			{
+			}
+			fragment_program_ref Ogre/Compositor/HDR/downscale3x3brightpass_fp
+			{
+			}
+
+			// Scene 
+			texture_unit
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering none 
+			}
+			// Luminence 
+			texture_unit
+			{
+				tex_address_mode clamp
+				filtering none 
+			}
+		}
+	}
+}
+
+// Bloom an area using gaussian distribution
+fragment_program Ogre/Compositor/HDR/bloomHLSL_fp hlsl
+{
+	source hdr.hlsl
+	entry_point bloom
+	target ps_2_0
+}
+fragment_program Ogre/Compositor/HDR/bloomGLSL_fp glsl
+{
+	source hdr_bloom.glsl
+	default_params
+	{
+		param_named inRTT int 0
+	}
+}
+fragment_program Ogre/Compositor/HDR/bloom_fp unified
+{
+	delegate Ogre/Compositor/HDR/bloomGLSL_fp
+	delegate Ogre/Compositor/HDR/bloomHLSL_fp
+}
+
+
+material Ogre/Compositor/HDR/GaussianBloom
+{
+	technique
+	{
+		pass
+		{
+			cull_hardware none
+			cull_software none
+			depth_check off
+
+			vertex_program_ref Ogre/Compositor/StdQuad_vp
+			{
+			}
+			fragment_program_ref Ogre/Compositor/HDR/bloom_fp
+			{
+			}
+
+			// Input 
+			texture_unit
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering none 
+			}
+		}
+	}
+}
+
+
+// Perform final tone mapping
+fragment_program Ogre/Compositor/HDR/finaltonemappingHLSL_fp hlsl
+{
+	source hdr.hlsl
+	entry_point finalToneMapping
+	target ps_2_0
+}
+fragment_program Ogre/Compositor/HDR/finaltonemappingGLSL_fp glsl
+{
+	source hdr_finalToneMapping.glsl
+	// re-use common functions
+	attach Ogre/Compositor/HDR/utils_fp
+	default_params
+	{
+		param_named inRTT int 0
+		param_named inBloom int 1
+		param_named inLum int 2
+	}
+}
+fragment_program Ogre/Compositor/HDR/finaltonemapping_fp unified
+{
+	delegate Ogre/Compositor/HDR/finaltonemappingHLSL_fp
+	delegate Ogre/Compositor/HDR/finaltonemappingGLSL_fp
+}
+
+material Ogre/Compositor/HDR/ToneMapping
+{
+	technique
+	{
+		pass
+		{
+			cull_hardware none
+			cull_software none
+			depth_check off
+
+			vertex_program_ref Ogre/Compositor/StdQuad_vp
+			{
+			}
+			fragment_program_ref Ogre/Compositor/HDR/finaltonemapping_fp
+			{
+			}
+
+			// Scene 
+			texture_unit
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+			}
+			// Bloom
+			texture_unit
+			{
+				tex_address_mode clamp
+			}
+			// Luminence 
+			texture_unit
+			{
+				tex_address_mode clamp
+			}
+		}
+	}
+}
+
+
