1
0
Fork 0

Merge branch 'master' of git://gitorious.org/fg/fgdata

This commit is contained in:
Detlef Faber 2011-12-04 12:00:59 +01:00
commit bd909173f5
6 changed files with 36 additions and 32 deletions

View file

@ -125,7 +125,7 @@
<program>
<vertex-shader n="0">Shaders/include_fog.vert</vertex-shader>
<vertex-shader n="1">Shaders/default.vert</vertex-shader>
<vertex-shader n="0">Shaders/include_fog.frag</vertex-shader>
<fragment-shader n="0">Shaders/include_fog.frag</fragment-shader>
<fragment-shader n="1">Shaders/terrain-nocolor.frag</fragment-shader>
</program>
<uniform>

View file

@ -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);

View file

@ -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;

View file

@ -2,9 +2,12 @@
// 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
#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

View file

@ -353,6 +353,7 @@
<min>0.0</min>
<max>5.0</max>
<step>1.0</step>
<fraction>0.17</fraction>
<property>/sim/rendering/shaders/quality-level</property>
<binding>
<command>dialog-apply</command>
@ -465,7 +466,7 @@
</enable>
<min>0.0</min>
<max>5000.0</max>
<property>/environment/snow-level-m</property>
<property>/sim/rendering/snow-level-m</property>
<binding>
<command>dialog-apply</command>
<object-name>snow-level</object-name>
@ -488,7 +489,7 @@
<label>12345678</label>
<format>%.fm</format>
<live>true</live>
<property>/environment/snow-level-m</property>
<property>/sim/rendering/snow-level-m</property>
</text>
</group>

View file

@ -184,6 +184,7 @@
<min>0.0</min>
<max>5.0</max>
<step>1.0</step>
<fraction>0.17</fraction>
<property>/sim/rendering/shaders/urban</property>
<binding>
<command>dialog-apply</command>
@ -196,6 +197,7 @@
<min>0.0</min>
<max>5.0</max>
<step>1.0</step>
<fraction>0.17</fraction>
<property>/sim/rendering/shaders/water</property>
<binding>
<command>dialog-apply</command>