Index: code/globalincs/def_files.cpp
===================================================================
--- code/globalincs/def_files.cpp	(revision 9414)
+++ code/globalincs/def_files.cpp	(working copy)
@@ -1302,16 +1302,25 @@
 "#ifdef FLAG_FOG\n"
 "varying float fogDist;\n"
 "#endif\n"
+"#ifdef FLAG_THRUSTER\n"
+"uniform float thruster_scale;\n"
+"#endif\n"
 "varying vec4 position;\n"
 "varying vec3 lNormal;\n"
 "void main()\n"
 "{\n"
 "	gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;\n"
-"	gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;\n"
+"	vec4 vertex = gl_Vertex;\n"
+" #ifdef FLAG_THRUSTER\n"
+"	if(vertex.z < -1.5) {\n"
+"		vertex.z *= thruster_scale;\n"
+"	}\n"
+" #endif\n"
+"	gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * vertex;\n"
 "	gl_FrontColor = gl_Color;\n"
 "	gl_FrontSecondaryColor = vec4(0.0, 0.0, 0.0, 1.0);\n"
 " // Transform the normal into eye space and normalize the result.\n"
-"	position = gl_ModelViewMatrix * gl_Vertex;\n"
+"	position = gl_ModelViewMatrix * vertex;\n"
 "	vec3 normal = normalize(gl_NormalMatrix * gl_Normal);\n"
 "	lNormal = normal;\n"
 " #ifdef FLAG_NORMAL_MAP\n"
@@ -1329,7 +1338,7 @@
 " #ifdef FLAG_FOG\n"
 "	fogDist = clamp((gl_Position.z - gl_Fog.start) * 0.75 * gl_Fog.scale, 0.0, 1.0);\n"
 " #endif\n"
-"	gl_ClipVertex = (gl_ModelViewMatrix * gl_Vertex);\n"
+"	gl_ClipVertex = (gl_ModelViewMatrix * vertex);\n"
 "}";
 
 char *Default_main_fragment_shader = 
Index: code/graphics/2d.h
===================================================================
--- code/graphics/2d.h	(revision 9414)
+++ code/graphics/2d.h	(working copy)
@@ -41,6 +41,7 @@
 #define SDR_FLAG_DISTORTION		(1<<10)
 #define SDR_FLAG_MISC_MAP		(1<<11)
 #define SDR_FLAG_TEAMCOLOR		(1<<12)
+#define SDR_FLAG_THRUSTER		(1<<13)
 
 // stencil buffering stuff
 extern int gr_stencil_mode;
Index: code/graphics/gropengldraw.cpp
===================================================================
--- code/graphics/gropengldraw.cpp	(revision 9414)
+++ code/graphics/gropengldraw.cpp	(working copy)
@@ -1195,6 +1195,8 @@
 		}
 	}
 
+	opengl_shader_set_current();
+
 	GLboolean cull_face = GL_state.CullFace(GL_FALSE);
 
 	if (flags & TMAP_FLAG_TRILIST) {
Index: code/graphics/gropenglshader.cpp
===================================================================
--- code/graphics/gropenglshader.cpp	(revision 9414)
+++ code/graphics/gropenglshader.cpp	(working copy)
@@ -55,7 +55,8 @@
 	{ SDR_FLAG_ENV_MAP,		3, {"sEnvmap", "alpha_spec", "envMatrix"}, 0, { NULL }, "Environment Mapping" },
 	{ SDR_FLAG_ANIMATED,	5, {"sFramebuffer", "effect_num", "anim_timer", "vpwidth", "vpheight"}, 0, { NULL }, "Animated Effects" },
 	{ SDR_FLAG_MISC_MAP,	1, {"sMiscmap"}, 0, { NULL }, "Utility mapping" },
-	{ SDR_FLAG_TEAMCOLOR,	2, {"stripe_color", "base_color"}, 0, { NULL }, "Team Colors" }
+	{ SDR_FLAG_TEAMCOLOR,	2, {"stripe_color", "base_color"}, 0, { NULL }, "Team Colors" },
+	{ SDR_FLAG_THRUSTER,	1, {"thruster_scale"}, 0, { NULL }, "Thruster scaling" }
 };
 
 static const int Main_shader_flag_references = sizeof(GL_Uniform_Reference_Main) / sizeof(opengl_shader_uniform_reference_t);
@@ -81,32 +82,34 @@
  */
 void opengl_shader_set_current(opengl_shader_t *shader_obj)
 {
-	Current_shader = shader_obj;
+	if (shader_obj != NULL) {
+		if(!Current_shader || (Current_shader->program_id != shader_obj->program_id)) {
+			Current_shader = shader_obj;
+			vglUseProgramObjectARB(Current_shader->program_id);
 
-	if (Current_shader != NULL) {
-		vglUseProgramObjectARB(Current_shader->program_id);
-
 #ifndef NDEBUG
-		if ( opengl_check_for_errors("shader_set_current()") ) {
-			vglValidateProgramARB(Current_shader->program_id);
+			if ( opengl_check_for_errors("shader_set_current()") ) {
+				vglValidateProgramARB(Current_shader->program_id);
 
-			GLint obj_status = 0;
-			vglGetObjectParameterivARB(Current_shader->program_id, GL_OBJECT_VALIDATE_STATUS_ARB, &obj_status);
+				GLint obj_status = 0;
+				vglGetObjectParameterivARB(Current_shader->program_id, GL_OBJECT_VALIDATE_STATUS_ARB, &obj_status);
 
-			if ( !obj_status ) {
-				opengl_shader_check_info_log(Current_shader->program_id);
+				if ( !obj_status ) {
+					opengl_shader_check_info_log(Current_shader->program_id);
 	
-				mprintf(("VALIDATE INFO-LOG:\n"));
+					mprintf(("VALIDATE INFO-LOG:\n"));
 
-				if (strlen(GLshader_info_log) > 5) {
-					mprintf(("%s\n", GLshader_info_log));
-				} else {
-					mprintf(("<EMPTY>\n"));
+					if (strlen(GLshader_info_log) > 5) {
+						mprintf(("%s\n", GLshader_info_log));
+					} else {
+						mprintf(("<EMPTY>\n"));
+					}
 				}
 			}
 		}
 #endif
 	} else {
+		Current_shader = NULL;
 		vglUseProgramObjectARB(0);
 	}
 }
@@ -237,6 +240,10 @@
 		sflags += "#define FLAG_TEAMCOLOR\n";
 	}
 
+	if (flags & SDR_FLAG_THRUSTER) {
+		sflags += "#define FLAG_THRUSTER\n";
+	}
+
 	const char *shader_flags = sflags.c_str();
 	int flags_len = strlen(shader_flags);
 
Index: code/graphics/gropengltnl.cpp
===================================================================
--- code/graphics/gropengltnl.cpp	(revision 9414)
+++ code/graphics/gropengltnl.cpp	(working copy)
@@ -68,8 +68,6 @@
 GLint GL_max_elements_vertices = 4096;
 GLint GL_max_elements_indices = 4096;
 
-int Buffer_sdr = -1;
-
 team_color* Current_team_color;
 team_color Current_temp_color;
 bool Using_Team_Color = false;
@@ -418,7 +416,6 @@
 
 		if ( (Use_GLSL > 1) && !GLSL_override ) {
 			opengl_shader_set_current();
-			Buffer_sdr = -1;
 		}
 
 		return;
@@ -583,6 +580,8 @@
 
 extern bool Scene_framebuffer_in_frame;
 extern GLuint Framebuffer_fallback_texture_id;
+extern int Interp_thrust_scale_subobj;
+extern float Interp_thrust_scale;
 static void opengl_render_pipeline_program(int start, const vertex_buffer *bufferp, const buffer_data *datap, int flags)
 {
 	float u_scale, v_scale;
@@ -650,6 +649,10 @@
 		}
 	}
 
+	if ( Interp_thrust_scale_subobj ) {
+		shader_flags |= SDR_FLAG_THRUSTER;
+	}
+
 	// find proper shader
 	if (shader_flags == GL_last_shader_flags) {
 		sdr_index = GL_last_shader_index;
@@ -667,10 +670,7 @@
 
 	Assert( sdr_index >= 0 );
 
-	if ( sdr_index != Buffer_sdr ) {
-		Buffer_sdr = sdr_index;
-		opengl_shader_set_current( &GL_shader[sdr_index] );
-	}
+	opengl_shader_set_current( &GL_shader[sdr_index] );
 
 	opengl_default_light_settings( !GL_center_alpha, (Interp_light > 0.25f) );
 	gr_opengl_set_center_alpha(GL_center_alpha);
@@ -800,6 +800,10 @@
 		vglUniform3fARB( opengl_shader_get_uniform("base_color"), Current_team_color->base.r, Current_team_color->base.g, Current_team_color->base.b);
 	}
 
+	if (shader_flags & SDR_FLAG_THRUSTER) {
+		vglUniform1fARB( opengl_shader_get_uniform("thruster_scale"), Interp_thrust_scale);
+	}
+
 	// DRAW IT!!
 	//DO_RENDER();
 
Index: code/model/modelinterp.cpp
===================================================================
--- code/model/modelinterp.cpp	(revision 9414)
+++ code/model/modelinterp.cpp	(working copy)
@@ -113,8 +113,8 @@
 bool Interp_desaturate = false;
 
 // If non-zero, then the subobject gets scaled by Interp_thrust_scale.
-static int Interp_thrust_scale_subobj = 0;
-static float Interp_thrust_scale = 0.1f;
+int Interp_thrust_scale_subobj = 0;
+float Interp_thrust_scale = 0.1f;
 static float Interp_thrust_scale_x = 0.0f;//added -bobboau
 static float Interp_thrust_scale_y = 0.0f;//added -bobboau
 
@@ -4602,7 +4602,9 @@
 		forced_blend_filter = GR_ALPHABLEND_FILTER;
 	}
 
-	gr_push_scale_matrix(&scale);
+	if (!Interp_thrust_scale_subobj) {
+		gr_push_scale_matrix(&scale);
+	}
 
 	size_t buffer_size = model->buffer.tex_buf.size();
 
