 	color.a = diffuse.a;
 
 	#if !defined(USE_LIGHT_MAPPING) || !defined(USE_DELUXE_MAPPING)
-		// Compute light grid position.
-		vec3 lightGridPos = (var_Position - u_LightGridOrigin) * u_LightGridScale;
+		#if !defined(HACK_NO_BSP_GRID_LIGHTDIR)
+			// Compute light grid position.
+			vec3 lightGridPos = (var_Position - u_LightGridOrigin) * u_LightGridScale;
+		#endif
 	#endif
 
 	#if defined(USE_DELUXE_MAPPING)

		https://github.com/DaemonEngine/Daemon/issues/299#issuecomment-606186347
		*/

		// Divide by cosine term to restore original light color.
		lightColor /= clamp(dot(normalize(var_Normal), lightDir), 0.3, 1.0);
	#endif

	// Blend static light.
	computeLight(lightDir, normal, viewDir, lightColor, diffuse, material, color);

	// Blend dynamic lights.
	computeDLights(var_Position, normal, viewDir, diffuse, material, color);

IN(smooth) vec3		var_Binormal;
IN(smooth) vec3		var_Normal;

#if defined(USE_BSP_SURFACE) && defined(USE_LIGHT_MAPPING) && !defined(USE_DELUXE_MAPPING)
/* HACK: restore legacy behavior for bsp surface with lightmap
but no deluxemap, do not use the lightgrid to compute the light
direction, do not do normal mapping neither specular mapping
with static lights.
https://github.com/DaemonEngine/Daemon/issues/324

Comment out this line to enable lightgrid light direction with
lightmap light color when there is no deluxe map.
*/
	#define HACK_NO_BSP_GRID_LIGHTDIR
#endif

#if defined(USE_LIGHT_MAPPING)
	uniform sampler2D u_LightMap;
#else
