Index: data/trunk/materials/Flares.material
===================================================================
--- data/trunk/materials/Flares.material	(revision 11038)
+++ data/trunk/materials/Flares.material	(revision 11084)
@@ -126,4 +126,22 @@
 				texture backlightflare.png
 			}
+
+			emissive 1 1 1
+		}
+	}
+
+	technique
+	{
+		scheme glow
+		pass
+		{
+			texture_unit
+			{
+				texture backlightflare_glow.png
+			}
+			ambient 1 1 1
+			diffuse 1 1 1
+			specular 0 0 0 1
+			emissive 1 1 1
 		}
 	}
@@ -144,4 +162,22 @@
 				texture bigflare1.png
 			}
+
+			emissive 1 1 1
+		}
+	}
+
+	technique
+	{
+		scheme glow
+		pass
+		{
+			texture_unit
+			{
+				texture bigflare1_glow.png
+			}
+			ambient 1 1 1
+			diffuse 1 1 1
+			specular 0 0 0 1
+			emissive 1 1 1
 		}
 	}
Index: data/trunk/materials/PE_materials.material
===================================================================
--- data/trunk/materials/PE_materials.material	(revision 11038)
+++ data/trunk/materials/PE_materials.material	(revision 11084)
@@ -195,4 +195,22 @@
 				texture explosion3.png
 			}
+
+			emissive 1 1 1
+		}
+	}
+
+	technique
+	{
+		scheme glow
+		pass
+		{
+			texture_unit
+			{
+				texture explosion3_glow.png
+			}
+			ambient 1 1 1
+			diffuse 1 1 1
+			specular 0 0 0 1
+			emissive 1 1 1
 		}
 	}
Index: data/trunk/materials/Trail.material
===================================================================
--- data/trunk/materials/Trail.material	(revision 11038)
+++ data/trunk/materials/Trail.material	(revision 11084)
@@ -14,4 +14,22 @@
 				texture backlighttrail.png
 			}
+
+			emissive 1 1 1
+		}
+	}
+
+	technique
+	{
+		scheme glow
+		pass
+		{
+			texture_unit
+			{
+				texture backlighttrail_glow.png
+			}
+			ambient 1 1 1
+			diffuse 1 1 1
+			specular 0 0 0 1
+			emissive 1 1 1
 		}
 	}
Index: data/trunk/materials/glow.compositor
===================================================================
--- data/trunk/materials/glow.compositor	(revision 11084)
+++ data/trunk/materials/glow.compositor	(revision 11084)
@@ -0,0 +1,63 @@
+compositor Glow
+{
+	technique
+	{
+		texture rt_output target_width target_height PF_A8R8G8B8
+		texture glowMap target_width_scaled 0.25 target_height_scaled 0.25 PF_A8R8G8B8
+		texture blurX target_width_scaled 0.25 target_height_scaled 0.25 PF_A8R8G8B8
+		texture blurXY target_width_scaled 0.25 target_height_scaled 0.25 PF_A8R8G8B8
+
+		//Fetch scene contents.
+		target rt_output
+		{
+			input previous
+		}
+
+		//Get scene rendered with 'Glow' scheme
+		target glowMap
+		{
+			input none
+			material_scheme glow
+			pass clear
+			{
+			}
+			pass render_scene
+			{
+			}
+		}
+
+		//Blur it along X.
+		target blurX
+		{
+			input none
+			pass render_quad
+			{
+				material GlowCompositorMat/GlowX
+				input 0 glowMap
+			}
+		}
+
+		//Blur it along Y.
+		target blurXY
+		{
+			input none
+			pass render_quad
+			{
+				material GlowCompositorMat/GlowY
+				input 0 blurX
+			}
+		}
+
+		//add to original, and output.
+		target_output
+		{
+			input none
+			pass render_quad
+			{
+				material GlowCompositorMat/GlowBlend
+				input 0 rt_output
+				input 1 blurXY
+			}
+		}
+	}
+}
Index: data/trunk/materials/glow.program
===================================================================
--- data/trunk/materials/glow.program	(revision 11084)
+++ data/trunk/materials/glow.program	(revision 11084)
@@ -0,0 +1,112 @@
+fragment_program GlowX_fp cg
+{
+	source glow.cg
+	entry_point GlowX_fp
+
+		default_params
+		{
+			param_named_auto invTexSize inverse_texture_size 0
+		}
+
+	profiles ps_2_0 arbfp1
+}
+
+material GlowCompositorMat/GlowX
+{
+	technique
+	{
+		pass
+		{
+			cull_hardware none
+			cull_software none
+			depth_func always_pass
+
+			fragment_program_ref GlowX_fp
+			{
+			}
+
+			texture_unit
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering linear linear linear
+			}
+		}
+	}
+}
+
+fragment_program GlowY_fp cg
+{
+	source glow.cg
+	entry_point GlowY_fp
+
+		default_params
+		{
+			param_named_auto invTexSize inverse_texture_size 0
+		}
+
+	profiles ps_2_0 arbfp1
+}
+
+material GlowCompositorMat/GlowY
+{
+	technique
+	{
+		pass
+		{
+			cull_hardware none
+			cull_software none
+			depth_func always_pass
+
+			fragment_program_ref GlowY_fp
+			{
+			}
+
+			texture_unit
+			{
+				tex_coord_set 0
+				tex_address_mode clamp
+				filtering linear linear linear
+			}
+		}
+	}
+}
+
+fragment_program GlowBlend_fp cg
+{
+	source glow.cg
+	entry_point GlowBlend_fp
+
+	profiles ps_2_0 arbfp1
+}
+
+material GlowCompositorMat/GlowBlend
+{
+	technique
+	{
+		pass
+		{
+			cull_hardware none
+			cull_software none
+			depth_func always_pass
+
+			fragment_program_ref GlowBlend_fp
+			{
+			}
+
+			texture_unit
+			{
+					tex_coord_set 0
+					tex_address_mode clamp
+					filtering trilinear
+			}
+
+			texture_unit
+			{
+					tex_coord_set 0
+					tex_address_mode clamp
+					filtering trilinear
+			}
+		}
+	}
+}
Index: data/trunk/materials/laserbeam.material
===================================================================
--- data/trunk/materials/laserbeam.material	(revision 11038)
+++ data/trunk/materials/laserbeam.material	(revision 11084)
@@ -13,6 +13,22 @@
 				colour_op modulate
 			}
+			emissive 1 1 1
 		}
+	}
 
+	technique
+	{
+		scheme glow
+		pass
+		{
+			texture_unit
+			{
+				texture laserbeam_glow.png
+			}
+			ambient 1 1 1
+			diffuse 1 1 1
+			specular 0 0 0 1
+			emissive 1 1 1
+		}
 	}
 }
Index: data/trunk/programs/glow.cg
===================================================================
--- data/trunk/programs/glow.cg	(revision 11084)
+++ data/trunk/programs/glow.cg	(revision 11084)
@@ -0,0 +1,72 @@
+//A.
+float4 GlowX_fp
+	(
+		float2 uv: TEXCOORD0,
+
+		uniform sampler2D scene: register(s0),
+		uniform float4 invTexSize
+	) : COLOR
+#define RENDER_SCENE 1
+#define BLUR_RADIUS 1
+{
+	float4 colour = float4(0);
+	float blurSize = BLUR_RADIUS * invTexSize.x;
+
+	//X-blur.
+	int x = uv.x/blurSize;
+	colour += tex2D(scene, float2((x - 4.0) * blurSize, uv.y)) * 1.0/25.0;
+	colour += tex2D(scene, float2((x - 3.0) * blurSize, uv.y)) * 2.0/25.0;
+	colour += tex2D(scene, float2((x - 2.0) * blurSize, uv.y)) * 3.0/25.0;
+	colour += tex2D(scene, float2((x - 1.0) * blurSize, uv.y)) * 4.0/25.0;
+	colour += tex2D(scene, float2((x + 0.0) * blurSize, uv.y)) * 5.0/25.0;
+	colour += tex2D(scene, float2((x + 1.0) * blurSize, uv.y)) * 4.0/25.0;
+	colour += tex2D(scene, float2((x + 2.0) * blurSize, uv.y)) * 3.0/25.0;
+	colour += tex2D(scene, float2((x + 3.0) * blurSize, uv.y)) * 2.0/25.0;
+	colour += tex2D(scene, float2((x + 4.0) * blurSize, uv.y)) * 1.0/25.0;
+
+	return colour;
+}
+
+//B.
+float4 GlowY_fp
+	(
+		float2 uv: TEXCOORD0,
+ 
+		uniform sampler2D blurX: register(s0),
+		uniform float4 invTexSize
+	) : COLOR
+{
+	float4 colour = float4(0);
+	float blurSize = BLUR_RADIUS * invTexSize.y;
+
+	//Y-blur.
+	int y = uv.y/blurSize;
+	colour += tex2D(blurX, float2(uv.x, (y - 4.0) * blurSize)) * 1.0/25.0;
+	colour += tex2D(blurX, float2(uv.x, (y - 3.0) * blurSize)) * 2.0/25.0;
+	colour += tex2D(blurX, float2(uv.x, (y - 2.0) * blurSize)) * 3.0/25.0;
+	colour += tex2D(blurX, float2(uv.x, (y - 1.0) * blurSize)) * 4.0/25.0;
+	colour += tex2D(blurX, float2(uv.x, (y + 0.0) * blurSize)) * 5.0/25.0;
+	colour += tex2D(blurX, float2(uv.x, (y + 1.0) * blurSize)) * 4.0/25.0;
+	colour += tex2D(blurX, float2(uv.x, (y + 2.0) * blurSize)) * 3.0/25.0;
+	colour += tex2D(blurX, float2(uv.x, (y + 3.0) * blurSize)) * 2.0/25.0;
+	colour += tex2D(blurX, float2(uv.x, (y + 4.0) * blurSize)) * 1.0/25.0;
+
+	return colour;
+}
+
+//C.
+float4 GlowBlend_fp
+	(
+		float2 uv: TEXCOORD0,
+
+		uniform sampler2D scene: register(s0),
+		uniform sampler2D blurXY: register(s1)
+	) : COLOR
+{
+	//Add this to original, return.
+	return
+#if RENDER_SCENE
+		tex2D(scene, uv) +
+#endif
+		tex2D(blurXY, uv) * 4;
+}
