diff --git a/Effects/bowwave.eff b/Effects/bowwave.eff index 8b4dc5ec9..35ca8be49 100644 --- a/Effects/bowwave.eff +++ b/Effects/bowwave.eff @@ -144,15 +144,9 @@ /sim/rendering/shaders/landmass - - /environment/sea/color_r - - - /environment/sea/color_g - - - /environment/sea/color_b - + /environment/sea/color_r + /environment/sea/color_g + /environment/sea/color_b @@ -378,11 +372,8 @@ - - Shaders/wake-ALS.vert - - Shaders/bowwave-ALS.frag - Shaders/hazes.frag + Shaders/wake-ALS.vert + Shaders/bowwave-ALS.frag water_reflection @@ -539,10 +530,42 @@ - cloud_self_shading - float - cloud_self_shading - + cloud_self_shading + float + cloud_self_shading + + + + + 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 + diff --git a/Effects/cloud-static.eff b/Effects/cloud-static.eff index cfdbb9654..b7a9f0e9a 100644 --- a/Effects/cloud-static.eff +++ b/Effects/cloud-static.eff @@ -8,6 +8,14 @@ /sim/rendering/eye-altitude-m /environment/cloud-self-shading /environment/moonlight + /sim/rendering/als-filters/use-filtering + /sim/rendering/als-filters/gamma + /sim/rendering/als-filters/brightness + /environment/surface/delta-T-cloud + /sim/rendering/als-filters/use-night-vision + /sim/rendering/als-filters/use-IR-vision + /sim/startup/xsize + /sim/startup/ysize @@ -58,6 +66,8 @@ Shaders/cloud-static-ALS.vert Shaders/cloud-static-ALS.frag + Shaders/noise.frag + Shaders/filters-ALS.frag baseTexture @@ -84,6 +94,46 @@ float moonlight + + 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 + + + display_xsize + int + display_xsize + + + display_ysize + int + display_ysize + true diff --git a/Effects/dirt-runway.eff b/Effects/dirt-runway.eff index 3ac13231b..880e04fde 100644 --- a/Effects/dirt-runway.eff +++ b/Effects/dirt-runway.eff @@ -144,6 +144,7 @@ Shaders/noise.frag Shaders/hazes.frag Shaders/secondary_lights.frag + Shaders/filters-ALS.frag visibility @@ -330,6 +331,38 @@ 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 diff --git a/Effects/flutter.eff b/Effects/flutter.eff index 5e2942821..05f04ac3f 100644 --- a/Effects/flutter.eff +++ b/Effects/flutter.eff @@ -133,11 +133,7 @@ texture[0]/wrap-t - + 1 @@ -151,12 +147,9 @@ Shaders/flutter-ALS.vert Shaders/terrain-ALS-base.frag Shaders/hazes.frag + Shaders/noise.frag + Shaders/filters-ALS.frag - colorMode int @@ -164,13 +157,6 @@ material/color-mode-uniform - Offset float @@ -262,6 +248,47 @@ fogtype + + + 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 + + + display_xsize + int + display_xsize + + + display_ysize + int + display_ysize + diff --git a/Effects/glass.eff b/Effects/glass.eff index 95e8519a0..8daa2e0a3 100644 --- a/Effects/glass.eff +++ b/Effects/glass.eff @@ -157,6 +157,7 @@ Shaders/glass-ALS.vert Shaders/glass-ALS.frag Shaders/noise.frag + Shaders/filters-ALS.frag @@ -309,6 +310,38 @@ float overlay-glare + + + 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 + + texture sampler-2d diff --git a/Effects/model-interior.eff b/Effects/model-interior.eff index a862931d8..bddc8f2b6 100644 --- a/Effects/model-interior.eff +++ b/Effects/model-interior.eff @@ -142,8 +142,9 @@ Shaders/model-interior-ALS-detailed.vert Shaders/model-interior-ALS-detailed.frag - Shaders/secondary_lights.frag + Shaders/noise.frag + Shaders/filters-ALS.frag visibility @@ -355,6 +356,37 @@ float residual-ambience-b + + + 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 + texture sampler-2d @@ -488,6 +520,8 @@ Shaders/model-interior-ALS-base.frag Shaders/hazes.frag Shaders/secondary_lights.frag + Shaders/noise.frag + Shaders/filters-ALS.frag visibility @@ -629,6 +663,37 @@ int display_ysize + + + 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 + texture sampler-2d diff --git a/Shaders/bowwave-ALS.frag b/Shaders/bowwave-ALS.frag index 11a7bbc50..47cc48361 100644 --- a/Shaders/bowwave-ALS.frag +++ b/Shaders/bowwave-ALS.frag @@ -59,6 +59,7 @@ vec3 specular_light; float fog_func (in float targ, in float alt); vec3 get_hazeColor(in float light_arg); +vec3 filter_combined (in vec3 color) ; const float terminator_width = 200000.0; const float EarthRadius = 5800000.0; @@ -436,7 +437,7 @@ if (intensity > 0.0) // this needs to be a condition, because otherwise hazeColo } - + finalColor.rgb = filter_combined(finalColor.rgb); gl_FragColor = vec4(finalColor.rgb, alpha0.a * 1.35); diff --git a/Shaders/cloud-static-ALS.frag b/Shaders/cloud-static-ALS.frag index 1c84c0a47..2d560c467 100644 --- a/Shaders/cloud-static-ALS.frag +++ b/Shaders/cloud-static-ALS.frag @@ -3,10 +3,16 @@ varying float fogFactor; varying vec3 hazeColor; +vec3 filter_combined (in vec3 color) ; + void main(void) { vec4 base = texture2D( baseTexture, gl_TexCoord[0].st); vec4 finalColor = base * gl_Color; - gl_FragColor.rgb = mix(hazeColor, finalColor.rgb, fogFactor ); - gl_FragColor.a = mix(0.0, finalColor.a, 1.0 - 0.5 * (1.0 - fogFactor)); + + vec4 fragColor = vec4 (mix(hazeColor, finalColor.rgb, fogFactor ), mix(0.0, finalColor.a, 1.0 - 0.5 * (1.0 - fogFactor))); + + + fragColor.rgb = filter_combined(fragColor.rgb); + gl_FragColor = fragColor; } diff --git a/Shaders/cloud-static.frag b/Shaders/cloud-static.frag index b51ff3af4..819e0852b 100644 --- a/Shaders/cloud-static.frag +++ b/Shaders/cloud-static.frag @@ -1,6 +1,8 @@ uniform sampler2D baseTexture; varying float fogFactor; +vec3 filter_combined (in vec3 color) ; + void main(void) { vec4 base = texture2D( baseTexture, gl_TexCoord[0].st); diff --git a/Shaders/drunway-ALS.frag b/Shaders/drunway-ALS.frag index 4720713b4..cf5b571c5 100644 --- a/Shaders/drunway-ALS.frag +++ b/Shaders/drunway-ALS.frag @@ -80,7 +80,7 @@ vec3 searchlight(); vec3 landing_light(in float offset, in float offsetv); vec3 rayleigh_out_shift(in vec3 color, in float outscatter); vec3 get_hazeColor(in float light_arg); - +vec3 filter_combined (in vec3 color) ; @@ -495,6 +495,8 @@ fragColor.rgb = mix(hazeColor +secondary_light * fog_backscatter(mvisibility) , } +fragColor.rgb = filter_combined(fragColor.rgb); + gl_FragColor = fragColor; } diff --git a/Shaders/glass-ALS.frag b/Shaders/glass-ALS.frag index 165cdc438..2ea17c8f1 100644 --- a/Shaders/glass-ALS.frag +++ b/Shaders/glass-ALS.frag @@ -52,6 +52,7 @@ uniform vec3 lightmap_a_color; float DotNoise2D(in vec2 coord, in float wavelength, in float fractionalMaxDotSize, in float dot_density); float DropletNoise2D(in vec2 coord, in float wavelength, in float fractionalMaxDotSize, in float dot_density); float Noise2D(in vec2 coord, in float wavelength); +vec3 filter_combined (in vec3 color) ; void main() { @@ -245,6 +246,7 @@ vec4 fragColor; fragColor.rgb = mix(outerColor.rgb, fog_texel.rgb, fog_texel.a); fragColor.a = max(outerColor.a, fog_texel.a); +fragColor.rgb = filter_combined(fragColor.rgb); gl_FragColor = clamp(fragColor,0.0,1.0); diff --git a/Shaders/model-interior-ALS-base.frag b/Shaders/model-interior-ALS-base.frag index b0cec693e..28b0e744e 100644 --- a/Shaders/model-interior-ALS-base.frag +++ b/Shaders/model-interior-ALS-base.frag @@ -57,7 +57,7 @@ float fog_backscatter(in float avisibility); vec3 get_hazeColor(in float light_arg); vec3 flashlight(in vec3 color, in float radius); - +vec3 filter_combined (in vec3 color) ; float luminance(vec3 color) { @@ -175,7 +175,7 @@ void main() } - +fragColor.rgb = filter_combined(fragColor.rgb); gl_FragColor = fragColor; diff --git a/Shaders/model-interior-ALS-detailed.frag b/Shaders/model-interior-ALS-detailed.frag index 8171fc8c6..e4a27d587 100644 --- a/Shaders/model-interior-ALS-detailed.frag +++ b/Shaders/model-interior-ALS-detailed.frag @@ -70,9 +70,8 @@ float alt_factor(in float eye_alt, in float vertex_alt); float light_distance_fading(in float dist); float fog_backscatter(in float avisibility); -//vec3 get_hazeColor(in float light_arg); vec3 flashlight(in vec3 color, in float radius); - +vec3 filter_combined (in vec3 color) ; float luminance(vec3 color) { @@ -221,7 +220,7 @@ void main() fragColor.rgb = max(fragColor.rgb, lightmapcolor.rgb * gl_FrontMaterial.diffuse.rgb * smoothstep(0.0, 1.0, texel.rgb*.5 + lightmapcolor.rgb*.5)); } - +fragColor.rgb = filter_combined(fragColor.rgb); gl_FragColor = fragColor;