Merge branch 'master' of git://gitorious.org/fg/fgdata
This commit is contained in:
commit
7b20bf2d04
6 changed files with 225 additions and 217 deletions
|
@ -2,6 +2,10 @@
|
|||
// http://www.bonzaisoftware.com/water_tut.html and its glsl conversion
|
||||
// available at http://forum.bonzaisoftware.com/viewthread.php?tid=10
|
||||
// © Michael Horsch - 2005
|
||||
// Major update and revisions - 2011-10-07
|
||||
// © Emilian Huminiuc and Vivian Meazza
|
||||
// Optimisation - 2012-5-05
|
||||
// © Emilian Huminiuc and Vivian Meazza
|
||||
|
||||
#version 120
|
||||
#define fps2kts 0.5925
|
||||
|
@ -20,8 +24,8 @@ uniform int Status;
|
|||
|
||||
varying vec4 waterTex1; //moving texcoords
|
||||
varying vec4 waterTex2; //moving texcoords
|
||||
varying vec4 waterTex4; //viewts
|
||||
varying vec4 ecPosition;
|
||||
//varying vec4 waterTex4; //viewts
|
||||
//varying vec4 ecPosition;
|
||||
varying vec3 viewerdir;
|
||||
varying vec3 lightdir;
|
||||
varying vec3 normal;
|
||||
|
@ -124,7 +128,8 @@ void main(void)
|
|||
|
||||
}
|
||||
|
||||
vec4 viewt = normalize(waterTex4);
|
||||
//vec4 viewt = normalize(waterTex4);
|
||||
vec4 viewt = vec4(-E, 0.0) * 0.6;
|
||||
|
||||
vec4 disdis = texture2D(water_dudvmap, vec2(waterTex2 * tscale)* windScale * 2.0) * 2.0 - 1.0;
|
||||
vec4 dist = texture2D(water_dudvmap, vec2(waterTex1 + disdis*sca2)* windScale * 2.0) * 2.0 - 1.0;
|
||||
|
|
|
@ -2,14 +2,18 @@
|
|||
// http://www.bonzaisoftware.com/water_tut.html and its glsl conversion
|
||||
// available at http://forum.bonzaisoftware.com/viewthread.php?tid=10
|
||||
// © Michael Horsch - 2005
|
||||
// Major update and revisions - 2011-10-07
|
||||
// © Emilian Huminiuc and Vivian Meazza
|
||||
// Optimisation - 2012-5-05
|
||||
// © Emilian Huminiuc and Vivian Meazza
|
||||
|
||||
#version 120
|
||||
#define fps2kts 0.5925
|
||||
|
||||
varying vec4 waterTex1;
|
||||
varying vec4 waterTex2;
|
||||
varying vec4 waterTex4;
|
||||
varying vec4 ecPosition;
|
||||
//varying vec4 waterTex4;
|
||||
//varying vec4 ecPosition;
|
||||
varying vec3 viewerdir;
|
||||
varying vec3 lightdir;
|
||||
varying vec3 normal;
|
||||
|
@ -54,12 +58,12 @@ void main(void)
|
|||
vec3 N = normalize(gl_Normal);
|
||||
normal = N;
|
||||
|
||||
ecPosition = gl_ModelViewMatrix * gl_Vertex;
|
||||
// ecPosition = gl_ModelViewMatrix * gl_Vertex;
|
||||
|
||||
viewerdir = vec3(gl_ModelViewMatrixInverse[3]) - vec3(gl_Vertex);
|
||||
lightdir = normalize(vec3(gl_ModelViewMatrixInverse * gl_LightSource[0].position));
|
||||
|
||||
waterTex4 = vec4( ecPosition.xzy, 0.0 );
|
||||
// waterTex4 = vec4( ecPosition.xzy, 0.0 );
|
||||
|
||||
vec4 t1 = vec4(osg_SimulationTime*0.005217, 0.0, 0.0, 0.0);
|
||||
vec4 t2 = vec4(osg_SimulationTime*-0.0012, 0.0, 0.0, 0.0);
|
||||
|
|
|
@ -128,21 +128,23 @@ void main(void)
|
|||
|
||||
//load reflection
|
||||
vec4 tmp = vec4(lightdir, 0.0);
|
||||
vec4 refTex;
|
||||
vec4 refl;
|
||||
vec4 refTex = texture2D(water_reflection, vec2(tmp + waterTex1) * 32.0) ;
|
||||
vec4 refTexGrey = texture2D(water_reflection_grey, vec2(tmp + waterTex1) * 32.0) ;
|
||||
vec4 refl ;
|
||||
|
||||
// cover = 0;
|
||||
|
||||
if(cover >= 1.5){
|
||||
refTex = texture2D(water_reflection, vec2(tmp));
|
||||
refl= normalize(refTex);
|
||||
} else {
|
||||
refTex = texture2D(water_reflection_grey, vec2(tmp));
|
||||
refl = normalize(refTex);
|
||||
refl.a = 1.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
refl = normalize(refTexGrey);
|
||||
refl.r *= (0.75 + 0.15 * cover);
|
||||
refl.g *= (0.80 + 0.15 * cover);
|
||||
refl.b *= (0.875 + 0.125 * cover);
|
||||
refl.a *= 1.0;
|
||||
refl.a = 1.0;
|
||||
}
|
||||
|
||||
rotationmatrix(radians(2.1* windScale + 0.25 * sin(waterTex1.s *0.14)), RotationMatrix);
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 396 B After Width: | Height: | Size: 30 KiB |
Binary file not shown.
Before Width: | Height: | Size: 850 KiB After Width: | Height: | Size: 810 KiB |
|
@ -186,9 +186,6 @@ command interface /autopilot/route-manager/input:
|
|||
var apt = flightplan().destination;
|
||||
var rwy = flightplan().destination_runway;
|
||||
|
||||
debug.dump("updateAproaches for " ~ rwy.id);
|
||||
debug.dump(apt.getApproachList(rwy));
|
||||
|
||||
if (apt == nil or apt.getApproachList(rwy) == nil) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue