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 + + normalmap-enabled + + + + + + nmap_dds + int + + normalmap-dds + + + + + nmap_tile + float + + normalmap-tiling + + + + + + + lightmap_enabled + int + + lightmap-enabled + + + + + lightmap_multi + int + + lightmap-multi + + + + + lightmap_r_factor + float + + lightmap-factor[0] + + + + + lightmap_r_color + float-vec3 + + lightmap-color[0] + + + + + lightmap_g_factor + float + + lightmap-factor[1] + + + + + lightmap_g_color + float-vec3 + + lightmap-color[1] + + + + + lightmap_b_factor + float + + lightmap-factor[2] + + + + + lightmap_b_color + float-vec3 + + lightmap-color[2] + + + + + lightmap_a_factor + float + + lightmap-factor[3] + + + + + lightmap_a_color + float-vec3 + + lightmap-color[3] + + + + + darkmap_factor + float + + darkmap-factor + + + + + + refl_enabled + int + + reflection-enabled + + + + + refl_correction + float + + reflection-correction + + + + + + refl_map + int + + reflect-map-enabled + + + + + + refl_dynamic + int + + reflection-dynamic + + + + + + refl_rainbow + float + + reflection-rainbow + + + + + + refl_fresnel + float + + reflection-fresnel + + + + + + refl_noise + float + + reflection-noise + + + + + + dirt_enabled + int + + dirt-enabled + + + + + dirt_multi + int + + dirt-multi + + + + + dirt_r_color + float-vec3 + + dirt-color[0] + + + + + dirt_r_factor + float + + dirt-factor[0] + + + + + dirt_g_color + float-vec3 + + dirt-color[1] + + + + + dirt_g_factor + float + + dirt-factor[1] + + + + + dirt_b_color + float-vec3 + + dirt-color[2] + + + + + dirt_b_factor + float + + dirt-factor[2] + + + + + + + grain_texture_enabled + int + + grain-texture-enabled + + + + + grain_magnification + float + + grain-magnification + + + + + + rain_enabled + int + + rain-enabled + + + + + + amb_correction + float + + ambient-correction + + + + + hdg + float + + model-hdg + + + + + pitch + float + + model-pitch + + + + + roll + float + + model-roll + + + + + + visibility + float + + visibility + + + + avisibility + float + + avisibility + + + + hazeLayerAltitude + float + + lthickness + + + + scattering + float + + scattering + + + + terminator + float + + terminator + + + + ground_scattering + float + + ground_scattering + + + + terminator + float + + terminator + + + + terrain_alt + float + + terrain_alt + + + + overcast + float + + overcast + + + + eye_alt + float + + eye_alt + + + + cloud_self_shading + float + cloud_self_shading + + + moonlight + float + moonlight + + + air_pollution + float + air_pollution + + + rain_norm + float + rnorm + + + wetness + float + wetness + + + view_pitch_offset + float + view_pitch_offset + + + view_heading_offset + float + view_heading_offset + + + field_of_view + float + view_fov + + + landing_light1_offset + float + landing_light1_offset + + + landing_light2_offset + float + landing_light2_offset + + + landing_light3_offset + float + landing_light3_offset + + + gamma + float + gamma + + + brightness + float + brightness + + + use_filtering + bool + use_filtering + + + use_night_vision + bool + use_night_vision + + + use_IR_vision + bool + use_IR_vision + + + delta_T + float + delta_T + + + cloudpos1_x + float + cloudpos1_x + + + cloudpos1_y + float + cloudpos1_y + + + cloudpos2_x + float + cloudpos2_x + + + cloudpos2_y + float + cloudpos2_y + + + cloudpos3_x + float + cloudpos3_x + + + cloudpos3_y + float + cloudpos3_y + + + cloudpos4_x + float + cloudpos4_x + + + cloudpos4_y + float + cloudpos4_y + + + cloudpos5_x + float + cloudpos5_x + + + cloudpos5_y + float + cloudpos5_y + + + cloudpos6_x + float + cloudpos6_x + + + cloudpos6_y + float + cloudpos6_y + + + cloudpos7_x + float + cloudpos7_x + + + cloudpos7_y + float + cloudpos7_y + + + cloudpos8_x + float + cloudpos8_x + + + cloudpos8_y + float + cloudpos8_y + + + cloudpos9_x + float + cloudpos9_x + + + cloudpos9_y + float + cloudpos9_y + + + cloudpos10_x + float + cloudpos10_x + + + cloudpos10_y + float + cloudpos10_y + + + cloudpos11_x + float + cloudpos11_x + + + cloudpos11_y + float + cloudpos11_y + + + cloudpos12_x + float + cloudpos12_x + + + cloudpos12_y + float + cloudpos12_y + + + cloudpos13_x + float + cloudpos13_x + + + cloudpos13_y + float + cloudpos13_y + + + cloudpos14_x + float + cloudpos14_x + + + cloudpos14_y + float + cloudpos14_y + + + cloudpos15_x + float + cloudpos15_x + + + cloudpos15_y + float + cloudpos15_y + + + cloudpos16_x + float + cloudpos16_x + + + cloudpos16_y + float + cloudpos16_y + + + cloudpos17_x + float + cloudpos17_x + + + cloudpos17_y + float + cloudpos17_y + + + cloudpos18_x + float + cloudpos18_x + + + cloudpos18_y + float + cloudpos18_y + + + cloudpos19_x + float + cloudpos19_x + + + cloudpos19_y + float + cloudpos19_y + + + cloudpos20_x + float + cloudpos20_x + + + cloudpos20_y + float + cloudpos20_y + + + cloud_shadow_flag + int + cloud_shadow_flag + + + use_searchlight + int + use_searchlight + + + use_landing_light + int + use_landing_light + + + use_alt_landing_light + int + use_alt_landing_light + + + display_xsize + int + display_xsize + + + display_ysize + int + display_ysize + + + darkmap_enabled + int + darkmap-enabled + + 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;