From 609a3a196d6ee09faa44ddded521b4d7138a26d5 Mon Sep 17 00:00:00 2001 From: Vivian Meazza Date: Sat, 24 Dec 2011 15:47:09 +0000 Subject: [PATCH 1/2] Bugfix - prevent emissive dirt Signed-off-by: Vivian Meazza --- Effects/model-combined.eff | 62 +++++++++++++++++++------------------- Shaders/ubershader.frag | 47 +++++++++++++++-------------- 2 files changed, 56 insertions(+), 53 deletions(-) diff --git a/Effects/model-combined.eff b/Effects/model-combined.eff index cc4b069ab..b92260926 100644 --- a/Effects/model-combined.eff +++ b/Effects/model-combined.eff @@ -7,11 +7,11 @@ please see Docs/README.model-combined.eff for documentation Effects/model-default - + white - + 0 0 1.0 @@ -22,7 +22,7 @@ please see Docs/README.model-combined.eff for documentation clamp normalized - + 0 0 1.0 @@ -40,7 +40,7 @@ please see Docs/README.model-combined.eff for documentation clamp normalized - + 0 0.0 0 @@ -52,7 +52,7 @@ please see Docs/README.model-combined.eff for documentation clamp normalized - + cubemap @@ -88,7 +88,7 @@ please see Docs/README.model-combined.eff for documentation normalized 0.25 - + 0 0 @@ -100,7 +100,7 @@ please see Docs/README.model-combined.eff for documentation 0.0 0.05 - + /sim/rendering/shaders/model @@ -110,8 +110,8 @@ please see Docs/README.model-combined.eff for documentation 1 RenderBin - - smooth + + smooth orientation/model/heading-deg @@ -121,7 +121,7 @@ please see Docs/README.model-combined.eff for documentation orientation/model/roll-deg - + /environment/ground-visibility-m @@ -140,7 +140,7 @@ please see Docs/README.model-combined.eff for documentation /sim/rendering/shaders/skydome - + 0 @@ -355,7 +355,7 @@ please see Docs/README.model-combined.eff for documentation - + 9 noise @@ -427,7 +427,7 @@ please see Docs/README.model-combined.eff for documentation 9 - + nmap_enabled @@ -454,8 +454,8 @@ please see Docs/README.model-combined.eff for documentation - - + + lightmap_enabled int @@ -463,7 +463,7 @@ please see Docs/README.model-combined.eff for documentation lightmap-enabled - + lightmap_multi int @@ -498,7 +498,7 @@ please see Docs/README.model-combined.eff for documentation lightmap_g_color - float-vec3 + float-vec3 lightmap-color[1] @@ -514,7 +514,7 @@ please see Docs/README.model-combined.eff for documentation lightmap_b_color - float-vec3 + float-vec3 lightmap-color[2] @@ -536,7 +536,7 @@ please see Docs/README.model-combined.eff for documentation - + refl_enabled int @@ -544,7 +544,7 @@ please see Docs/README.model-combined.eff for documentation reflection-enabled - + refl_correction float @@ -561,7 +561,7 @@ please see Docs/README.model-combined.eff for documentation reflect-map-enabled - + refl_dynamic int @@ -670,7 +670,7 @@ please see Docs/README.model-combined.eff for documentation ambient-correction - + shader_qual int @@ -703,7 +703,7 @@ please see Docs/README.model-combined.eff for documentation - + visibility float @@ -746,7 +746,7 @@ please see Docs/README.model-combined.eff for documentation fogtype - + diff --git a/Shaders/ubershader.frag b/Shaders/ubershader.frag index 31d3b989b..cf9bbc0e2 100644 --- a/Shaders/ubershader.frag +++ b/Shaders/ubershader.frag @@ -140,9 +140,30 @@ void main (void) } else { mixedcolor = texel.rgb; } -///////////////////////////////////////////////////////////////////// -//END reflect -///////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////// + //END reflect + ///////////////////////////////////////////////////////////////////// + + ////////////////////////////////////////////////////////////////////// + //begin DIRT + ////////////////////////////////////////////////////////////////////// + if (dirt_enabled > 0.0){ + float dirtFactorR = reflmap.r * dirt_r_factor; + dirtFactorR = smoothstep(0.0, 1.0, dirtFactorR); + mixedcolor.rgb = mix(mixedcolor.rgb, dirt_r_color, dirtFactorR); + if (dirt_multi > 0) { + float dirtFactorG = reflmap.g * dirt_g_factor; + float dirtFactorB = reflmap.b * dirt_b_factor; + dirtFactorG = smoothstep(0.0, 1.0, dirtFactorG); + dirtFactorB = smoothstep(0.0, 1.0, dirtFactorB); + mixedcolor.rgb = mix(mixedcolor.rgb, dirt_g_color, dirtFactorG); + mixedcolor.rgb = mix(mixedcolor.rgb, dirt_b_color, dirtFactorB); + } + } + ////////////////////////////////////////////////////////////////////// + //END Dirt + ////////////////////////////////////////////////////////////////////// + // set ambient adjustment to remove bluiness with user input float ambient_offset = clamp(amb_correction, -1.0, 1.0); @@ -152,25 +173,7 @@ void main (void) color.a = texel.a * alpha; vec4 fragColor = vec4(color.rgb * mixedcolor + ambient_Correction.rgb, color.a); -////////////////////////////////////////////////////////////////////// -//begin DIRT -////////////////////////////////////////////////////////////////////// - if (dirt_enabled > 0.0){ - float dirtFactorR = reflmap.r * dirt_r_factor; - dirtFactorR = smoothstep(0.0, 1.0, dirtFactorR); - fragColor.rgb = mix(fragColor.rgb, dirt_r_color, dirtFactorR); - if (dirt_multi > 0) { - float dirtFactorG = reflmap.g * dirt_g_factor; - float dirtFactorB = reflmap.b * dirt_b_factor; - dirtFactorG = smoothstep(0.0, 1.0, dirtFactorG); - dirtFactorB = smoothstep(0.0, 1.0, dirtFactorB); - fragColor.rgb = mix(fragColor.rgb, dirt_g_color, dirtFactorG); - fragColor.rgb = mix(fragColor.rgb, dirt_b_color, dirtFactorB); - } - } -////////////////////////////////////////////////////////////////////// -//END Dirt -////////////////////////////////////////////////////////////////////// + fragColor += Specular * nmap.a; From 441b0d7b3085ad96674072bed523c51e3c90f5c6 Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 27 Dec 2011 22:56:48 +0000 Subject: [PATCH 2/2] Update atc-frequency dialogs for revised command interface. --- gui/dialogs/atc-freq-search.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gui/dialogs/atc-freq-search.xml b/gui/dialogs/atc-freq-search.xml index c3aab8201..3b64f0a6c 100644 --- a/gui/dialogs/atc-freq-search.xml +++ b/gui/dialogs/atc-freq-search.xml @@ -17,9 +17,8 @@ false ICAO - property-assign - /sim/atc/freq-airport - ICAO + ATC-freq-display + ICAO dialog-close @@ -60,6 +59,9 @@ dialog-apply + + ATC-freq-display + dialog-close