From 58dc77ad22850c3f01653b42246c650ed7b51dc9 Mon Sep 17 00:00:00 2001 From: Vivian Meazza Date: Fri, 2 Dec 2011 14:25:41 +0000 Subject: [PATCH 1/7] Bugfix Signed-off-by: Vivian Meazza --- Effects/terrain-default.eff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Effects/terrain-default.eff b/Effects/terrain-default.eff index 1b0276de9..3a0f5e909 100644 --- a/Effects/terrain-default.eff +++ b/Effects/terrain-default.eff @@ -125,7 +125,7 @@ Shaders/include_fog.vert Shaders/default.vert - Shaders/include_fog.frag + Shaders/include_fog.frag Shaders/terrain-nocolor.frag From 4eea1f6dfd4849a319924f5d0012f83de4af16d5 Mon Sep 17 00:00:00 2001 From: Vivian Meazza Date: Fri, 2 Dec 2011 14:33:34 +0000 Subject: [PATCH 2/7] Tidy up Signed-off-by: Vivian Meazza --- Shaders/terrain-nocolor.frag | 2 -- 1 file changed, 2 deletions(-) diff --git a/Shaders/terrain-nocolor.frag b/Shaders/terrain-nocolor.frag index 112e1bd4e..b2dc9a613 100644 --- a/Shaders/terrain-nocolor.frag +++ b/Shaders/terrain-nocolor.frag @@ -18,8 +18,6 @@ void main() texel = texture2D(texture, gl_TexCoord[0].st); fragColor = color * texel; - gl_FragColor = fragColor; - finalColor.rgb = fog_Func(fragColor.rgb, fogType); gl_FragColor = finalColor; From c4c8dd63d2971f1e56fa9d9e12316c36181efb4b Mon Sep 17 00:00:00 2001 From: Vivian Meazza Date: Fri, 2 Dec 2011 15:21:27 +0000 Subject: [PATCH 3/7] ATI fix Signed-off-by: Vivian Meazza --- Shaders/urban.frag | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Shaders/urban.frag b/Shaders/urban.frag index 80e2c349b..41edcef82 100644 --- a/Shaders/urban.frag +++ b/Shaders/urban.frag @@ -5,6 +5,8 @@ #version 120 +#extension GL_ATI_shader_texture_lod : enable + #define TEXTURE_MIP_LEVELS 10 #define TEXTURE_PIX_COUNT 1024 //pow(2,TEXTURE_MIP_LEVELS) #define BINARY_SEARCH_COUNT 10 From 2be53805324adce8765fb825994bea928bd8a604 Mon Sep 17 00:00:00 2001 From: Vivian Meazza Date: Fri, 2 Dec 2011 15:41:42 +0000 Subject: [PATCH 4/7] Correct path for snow, adjust slider size Signed-off-by: Vivian Meazza --- gui/dialogs/rendering.xml | 31 ++++++++++++++++--------------- gui/dialogs/shaders.xml | 2 ++ 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/gui/dialogs/rendering.xml b/gui/dialogs/rendering.xml index 3c6805582..d1c6333f1 100644 --- a/gui/dialogs/rendering.xml +++ b/gui/dialogs/rendering.xml @@ -341,7 +341,7 @@ true - + hbox @@ -353,6 +353,7 @@ 0.0 5.0 1.0 + 0.17 /sim/rendering/shaders/quality-level dialog-apply @@ -369,7 +370,7 @@ /sim/rendering/shaders/quality-level - + hbox - + vbox @@ -416,7 +417,7 @@ - + hbox @@ -430,11 +431,11 @@ true - + hbox right - + @@ -465,13 +466,13 @@ 0.0 5000.0 - /environment/snow-level-m + /sim/rendering/snow-level-m - dialog-apply - snow-level + dialog-apply + snow-level - + left @@ -488,10 +489,10 @@ %.fm true - /environment/snow-level-m + /sim/rendering/snow-level-m - + hbox @@ -510,7 +511,7 @@ true - + vbox @@ -570,7 +571,7 @@ /sim/rendering/mie - + hbox right @@ -656,7 +657,7 @@ /sim/rendering/dome-density - + 1 diff --git a/gui/dialogs/shaders.xml b/gui/dialogs/shaders.xml index 32e8406c7..75a4c462f 100644 --- a/gui/dialogs/shaders.xml +++ b/gui/dialogs/shaders.xml @@ -184,6 +184,7 @@ 0.0 5.0 1.0 + 0.17 /sim/rendering/shaders/urban dialog-apply @@ -196,6 +197,7 @@ 0.0 5.0 1.0 + 0.17 /sim/rendering/shaders/water dialog-apply From 8a5b3d744f3c90ba1601ed4c94f9bfca97a2c368 Mon Sep 17 00:00:00 2001 From: Vivian Meazza Date: Fri, 2 Dec 2011 15:50:56 +0000 Subject: [PATCH 5/7] Bugfix Signed-off-by: Vivian Meazza --- gui/dialogs/rendering.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/dialogs/rendering.xml b/gui/dialogs/rendering.xml index d1c6333f1..21a3ec741 100644 --- a/gui/dialogs/rendering.xml +++ b/gui/dialogs/rendering.xml @@ -466,7 +466,7 @@ 0.0 5000.0 - /sim/rendering/snow-level-m + /sim/rendering/snow-level-m dialog-apply snow-level @@ -489,7 +489,7 @@ %.fm true - /sim/rendering/snow-level-m + /sim/rendering/snow-level-m From b0f871a1e4a157294447afd4b857f329b66cf0cf Mon Sep 17 00:00:00 2001 From: Vivian Meazza Date: Fri, 2 Dec 2011 21:09:20 +0000 Subject: [PATCH 6/7] Add vars Signed-off-by: Vivian Meazza --- Nasal/weather-utility.nas | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Nasal/weather-utility.nas b/Nasal/weather-utility.nas index 7e3119eec..f11af508d 100644 --- a/Nasal/weather-utility.nas +++ b/Nasal/weather-utility.nas @@ -15,22 +15,22 @@ var Factor = 0.0004; var Sharp = 1.0; #add control properies for waves -wave_amp_Node = props.globals.getNode("/environment/wave/amp" , 1); +var wave_amp_Node = props.globals.getNode("/environment/wave/amp" , 1); wave_amp_Node.setDoubleValue(Amp); -wave_freq_Node = props.globals.getNode("/environment/wave/freq" , 1); +var wave_freq_Node = props.globals.getNode("/environment/wave/freq" , 1); wave_freq_Node.setDoubleValue(Freq); -wave_sharp_Node = props.globals.getNode("/environment/wave/sharp" , 1); +var wave_sharp_Node = props.globals.getNode("/environment/wave/sharp" , 1); wave_sharp_Node.setDoubleValue(Sharp); -wave_angle_Node = props.globals.getNode("/environment/wave/angle" , 1); +var wave_angle_Node = props.globals.getNode("/environment/wave/angle" , 1); wave_angle_Node.setDoubleValue(Angle); -wave_factor_Node = props.globals.getNode("/environment/wave/factor" , 1); +var wave_factor_Node = props.globals.getNode("/environment/wave/factor" , 1); wave_factor_Node.setDoubleValue(Factor); -wave_factor_Node = props.globals.getNode("/environment/wave/dangle" , 1); +var wave_factor_Node = props.globals.getNode("/environment/wave/dangle" , 1); wave_factor_Node.setDoubleValue(DAngle); props.globals.initNode("/environment/sea/surface/wind-speed-kt", 0, "DOUBLE"); @@ -46,28 +46,28 @@ props.globals.initNode("/orientation/model/roll-deg", 0, "DOUBLE"); var initialize = func { - wind_from_east_Node = props.globals.getNode("/environment/config/boundary/entry[0]/wind-from-east-fps", 1); + var wind_from_east_Node = props.globals.getNode("/environment/config/boundary/entry[0]/wind-from-east-fps", 1); wind_from_east_Node.setDoubleValue(0); - wind_from_north_Node = props.globals.getNode("/environment/config/boundary/entry[0]/wind-from-north-fps", 1); + var wind_from_north_Node = props.globals.getNode("/environment/config/boundary/entry[0]/wind-from-north-fps", 1); wind_from_north_Node.setDoubleValue(0); - wind_from_Node = props.globals.getNode("/environment/config/boundary/entry[0]/wind-from-heading-deg", 1); + var wind_from_Node = props.globals.getNode("/environment/config/boundary/entry[0]/wind-from-heading-deg", 1); wind_from_Node.setDoubleValue(0); - wind_speed_Node = props.globals.getNode("/environment/config/boundary/entry[0]/wind-speed-kt", 1); + var wind_speed_Node = props.globals.getNode("/environment/config/boundary/entry[0]/wind-speed-kt", 1); wind_speed_Node.setDoubleValue(0); - wind_status_Node = props.globals.getNode("/environment/config/enabled", 1); + var wind_status_Node = props.globals.getNode("/environment/config/enabled", 1); wind_status_Node.setBoolValue(1); - ground_vis_Node = props.globals.getNode("/environment/ground-visibility-m", 1); + var ground_vis_Node = props.globals.getNode("/environment/ground-visibility-m", 1); ground_vis_Node.setDoubleValue(500); - ground_thick_Node = props.globals.getNode("/environment/ground-haze-thickness-m" , 1); + var ground_thick_Node = props.globals.getNode("/environment/ground-haze-thickness-m" , 1); ground_thick_Node.setDoubleValue(300); - ground_term_Node = props.globals.getNode("/environment/terminator-relative-position-m" , 1); + var ground_term_Node = props.globals.getNode("/environment/terminator-relative-position-m" , 1); ground_term_Node.setDoubleValue(60000); From 55cbdc2dbf47bc13b4c1e8192afd7da6ded0e765 Mon Sep 17 00:00:00 2001 From: Frederic Bouvier Date: Sat, 3 Dec 2011 09:07:57 +0100 Subject: [PATCH 7/7] Restore correct attribution --- Shaders/urban.frag | 1 + 1 file changed, 1 insertion(+) diff --git a/Shaders/urban.frag b/Shaders/urban.frag index 41edcef82..9902104df 100644 --- a/Shaders/urban.frag +++ b/Shaders/urban.frag @@ -2,6 +2,7 @@ // Licence: GPL v2 // Author: Frederic Bouvier. // Adapted from the paper by F. Policarpo et al. : Real-time Relief Mapping on Arbitrary Polygonal Surfaces +// Adapted from the paper and sources by M. Drobot in GPU Pro : Quadtree Displacement Mapping with Height Blending #version 120