diff --git a/Effects/space-combined.eff b/Effects/space-combined.eff
index bbd0cf762..c3dde3b02 100644
--- a/Effects/space-combined.eff
+++ b/Effects/space-combined.eff
@@ -21,6 +21,751 @@
Shaders/space-ALS-ultra.vert
Shaders/space-ALS-ultra.frag
+
+
+ BaseTex
+ sampler-2d
+ 0
+
+
+
+ ReflNoiseTex
+ sampler-3d
+ 1
+
+
+
+ NormalTex
+ sampler-2d
+ 2
+
+
+
+ LightMapTex
+ sampler-2d
+ 3
+
+
+
+ ReflMapTex
+ sampler-2d
+ 4
+
+
+
+ Environment
+ sampler-cube
+ 5
+
+
+
+ ReflGradientsTex
+ sampler-2d
+ 6
+
+
+
+ GrainTex
+ sampler-2d
+ 7
+
+
+
+
+
+ nmap_enabled
+ int
+
+
+
+
+
+
+
+ nmap_dds
+ int
+
+
+
+
+
+
+ nmap_tile
+ float
+
+
+
+
+
+
+
+
+ lightmap_enabled
+ int
+
+
+
+
+
+
+ lightmap_multi
+ int
+
+
+
+
+
+
+ lightmap_r_factor
+ float
+
+
+
+
+
+
+ lightmap_r_color
+ float-vec3
+
+
+
+
+
+
+ lightmap_g_factor
+ float
+
+
+
+
+
+
+ lightmap_g_color
+ float-vec3
+
+
+
+
+
+
+ lightmap_b_factor
+ float
+
+
+
+
+
+
+ lightmap_b_color
+ float-vec3
+
+
+
+
+
+
+ lightmap_a_factor
+ float
+
+
+
+
+
+
+ lightmap_a_color
+ float-vec3
+
+
+
+
+
+
+ darkmap_factor
+ float
+
+
+
+
+
+
+
+ refl_enabled
+ int
+
+
+
+
+
+
+ refl_correction
+ float
+
+
+
+
+
+
+
+ refl_map
+ int
+
+
+
+
+
+
+
+ refl_dynamic
+ int
+
+
+
+
+
+
+
+ refl_rainbow
+ float
+
+
+
+
+
+
+
+ refl_fresnel
+ float
+
+
+
+
+
+
+
+ refl_noise
+ float
+
+
+
+
+
+
+
+ dirt_enabled
+ int
+
+
+
+
+
+
+ dirt_multi
+ int
+
+
+
+
+
+
+ dirt_r_color
+ float-vec3
+
+
+
+
+
+
+ dirt_r_factor
+ float
+
+
+
+
+
+
+ dirt_g_color
+ float-vec3
+
+
+
+
+
+
+ dirt_g_factor
+ float
+
+
+
+
+
+
+ dirt_b_color
+ float-vec3
+
+
+
+
+
+
+ dirt_b_factor
+ float
+
+
+
+
+
+
+
+
+ grain_texture_enabled
+ int
+
+
+
+
+
+
+ grain_magnification
+ float
+
+
+
+
+
+
+
+ rain_enabled
+ int
+
+
+
+
+
+
+
+ amb_correction
+ float
+
+
+
+
+
+
+ hdg
+ float
+
+
+
+
+
+
+ pitch
+ float
+
+
+
+
+
+
+ roll
+ float
+
+
+
+
+
+
+
+ visibility
+ float
+
+
+
+
+
+ avisibility
+ float
+
+
+
+
+
+ hazeLayerAltitude
+ float
+
+
+
+
+
+ scattering
+ float
+
+
+
+
+
+ terminator
+ float
+
+
+
+
+
+ ground_scattering
+ float
+
+
+
+
+
+ terminator
+ float
+
+
+
+
+
+ terrain_alt
+ float
+
+
+
+
+
+ overcast
+ float
+
+
+
+
+
+ eye_alt
+ float
+
+
+
+
+
+ cloud_self_shading
+ float
+
+
+
+ moonlight
+ float
+
+
+
+ air_pollution
+ float
+
+
+
+ rain_norm
+ float
+
+
+
+ wetness
+ float
+
+
+
+ view_pitch_offset
+ float
+
+
+
+ view_heading_offset
+ float
+
+
+
+ field_of_view
+ float
+
+
+
+ landing_light1_offset
+ float
+
+
+
+ landing_light2_offset
+ float
+
+
+
+ landing_light3_offset
+ float
+
+
+
+ gamma
+ float
+
+
+
+ brightness
+ float
+
+
+
+ use_filtering
+ bool
+
+
+
+ use_night_vision
+ bool
+
+
+
+ use_IR_vision
+ bool
+
+
+
+ delta_T
+ float
+
+
+
+ cloudpos1_x
+ float
+
+
+
+ cloudpos1_y
+ float
+
+
+
+ cloudpos2_x
+ float
+
+
+
+ cloudpos2_y
+ float
+
+
+
+ cloudpos3_x
+ float
+
+
+
+ cloudpos3_y
+ float
+
+
+
+ cloudpos4_x
+ float
+
+
+
+ cloudpos4_y
+ float
+
+
+
+ cloudpos5_x
+ float
+
+
+
+ cloudpos5_y
+ float
+
+
+
+ cloudpos6_x
+ float
+
+
+
+ cloudpos6_y
+ float
+
+
+
+ cloudpos7_x
+ float
+
+
+
+ cloudpos7_y
+ float
+
+
+
+ cloudpos8_x
+ float
+
+
+
+ cloudpos8_y
+ float
+
+
+
+ cloudpos9_x
+ float
+
+
+
+ cloudpos9_y
+ float
+
+
+
+ cloudpos10_x
+ float
+
+
+
+ cloudpos10_y
+ float
+
+
+
+ cloudpos11_x
+ float
+
+
+
+ cloudpos11_y
+ float
+
+
+
+ cloudpos12_x
+ float
+
+
+
+ cloudpos12_y
+ float
+
+
+
+ cloudpos13_x
+ float
+
+
+
+ cloudpos13_y
+ float
+
+
+
+ cloudpos14_x
+ float
+
+
+
+ cloudpos14_y
+ float
+
+
+
+ cloudpos15_x
+ float
+
+
+
+ cloudpos15_y
+ float
+
+
+
+ cloudpos16_x
+ float
+
+
+
+ cloudpos16_y
+ float
+
+
+
+ cloudpos17_x
+ float
+
+
+
+ cloudpos17_y
+ float
+
+
+
+ cloudpos18_x
+ float
+
+
+
+ cloudpos18_y
+ float
+
+
+
+ cloudpos19_x
+ float
+
+
+
+ cloudpos19_y
+ float
+
+
+
+ cloudpos20_x
+ float
+
+
+
+ cloudpos20_y
+ float
+
+
+
+ cloud_shadow_flag
+ int
+
+
+
+ use_searchlight
+ int
+
+
+
+ use_landing_light
+ int
+
+
+
+ use_alt_landing_light
+ int
+
+
+
+ display_xsize
+ int
+
+
+
+ display_ysize
+ int
+
+
+
+ darkmap_enabled
+ int
+
+
+
geo_light_r
float
diff --git a/Shaders/secondary_lights.frag b/Shaders/secondary_lights.frag
index e558b45f5..ea11d38c4 100644
--- a/Shaders/secondary_lights.frag
+++ b/Shaders/secondary_lights.frag
@@ -94,9 +94,9 @@ vec3 addLights(in vec3 color1, in vec3 color2)
{
vec3 outcolor;
-outcolor.r = 0.14 * log(exp(color1.r/0.14) + exp(color2.r/0.14));
-outcolor.g = 0.14 * log(exp(color1.g/0.14) + exp(color2.g/0.14));
-outcolor.b = 0.14 * log(exp(color1.b/0.14) + exp(color2.b/0.14));
+outcolor.r = 0.14 * log(exp(color1.r/0.14) + exp(color2.r/0.14)-1.0);
+outcolor.g = 0.14 * log(exp(color1.g/0.14) + exp(color2.g/0.14)-1.0);
+outcolor.b = 0.14 * log(exp(color1.b/0.14) + exp(color2.b/0.14)-1.0);
return outcolor;
}
diff --git a/Shaders/space-ALS-ultra.frag b/Shaders/space-ALS-ultra.frag
index ea9efabf3..4af7743be 100644
--- a/Shaders/space-ALS-ultra.frag
+++ b/Shaders/space-ALS-ultra.frag
@@ -457,13 +457,16 @@ void main (void)
lightmapFactor = lightmapFactor * lightmapTexel;
if (lightmap_multi > 0 ){
//lightmapcolor = lightmap_r_color * lightmapFactor.r +
- // lightmap_g_color * lightmapFactor.g +
- // lightmap_b_color * lightmapFactor.b +
- // lightmap_a_color * lightmapFactor.a ;
+ //lightmap_g_color * lightmapFactor.g +
+ //lightmap_b_color * lightmapFactor.b +
+ //lightmap_a_color * lightmapFactor.a ;
lightmapcolor = lightmap_r_color * lightmapFactor.r;
lightmapcolor = addLights(lightmapcolor, lightmap_g_color * lightmapFactor.g);
lightmapcolor = addLights(lightmapcolor, lightmap_b_color * lightmapFactor.b);
- lightmapcolor = addLights(lightmapcolor, lightmap_a_color * lightmapFactor.a);
+ if (darkmap_enabled == 0)
+ {
+ lightmapcolor = addLights(lightmapcolor, lightmap_a_color * lightmapFactor.a);
+ }
} else {
lightmapcolor = lightmapTexel.rgb * lightmap_r_color * lightmapFactor.r;