1
0
Fork 0

Merge branch 'master' of D:\Git_New\fgdata

This commit is contained in:
Vivian Meazza 2012-07-14 23:48:53 +01:00
commit e8e305d275
20 changed files with 255 additions and 40 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 KiB

After

Width:  |  Height:  |  Size: 424 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 KiB

After

Width:  |  Height:  |  Size: 337 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 448 KiB

After

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 507 KiB

After

Width:  |  Height:  |  Size: 430 KiB

View file

@ -68,10 +68,12 @@ This tutorial will teach you how to set the altimeter based on the ATIS (Automat
<step>
<message>In this lesson, you'll learn how to set the altimeter to the Livermore ATIS. I've already
set the radio to the correct frequency - 119.65 MHz</message>
<wait>10</wait>
</step>
<step>
<message>Listen to the ATIS message. If you cannot hear it, check the Sound Configuration item in the File menu.</message>
<wait>10</wait>
</step>
<step>
@ -79,10 +81,11 @@ This tutorial will teach you how to set the altimeter based on the ATIS (Automat
We can set this using Equipment->Instrument Settings, or we can adjust
the altimeter so that the altimeter matches the altitude of Livermore - 380ft.
</message>
<wait>10</wait>
<view>
<heading-offset-deg>353.8</heading-offset-deg>
<pitch-offset-deg>-17.3</pitch-offset-deg>
<pitch-offset-deg>-20.3</pitch-offset-deg>
<roll-offset-deg>0.0</roll-offset-deg>
<x-offset-m>-0.2</x-offset-m>
<y-offset-m>0.3</y-offset-m>
@ -99,7 +102,7 @@ This tutorial will teach you how to set the altimeter based on the ATIS (Automat
<view>
<heading-offset-deg>353.8</heading-offset-deg>
<pitch-offset-deg>-17.3</pitch-offset-deg>
<pitch-offset-deg>-20.3</pitch-offset-deg>
<roll-offset-deg>0.0</roll-offset-deg>
<x-offset-m>-0.2</x-offset-m>
<y-offset-m>0.3</y-offset-m>
@ -119,7 +122,7 @@ This tutorial will teach you how to set the altimeter based on the ATIS (Automat
<message>Set the altimeter to 380 feet, or the pressure setting to 29.97 inHG.</message>
<view>
<heading-offset-deg>353.8</heading-offset-deg>
<pitch-offset-deg>-17.3</pitch-offset-deg>
<pitch-offset-deg>-20.3</pitch-offset-deg>
<roll-offset-deg>0.0</roll-offset-deg>
<x-offset-m>-0.2</x-offset-m>
<y-offset-m>0.3</y-offset-m>

View file

@ -11,7 +11,7 @@ The Cessna 172 glides at a ratio of 10:1 at a best glide speed of 90kts IAS. The
Both KSFO (San Francisco International) and KHAF (Half Moon Bay) are within glide distance. In real life, you would opt for the larger of the two airports, but for an extra challenge, try to land at KHAF.
</description>
<timeofday>evening</timeofday>
<timeofday>dusk</timeofday>
<presets>
<airport-id>KHAF</airport-id>
<on-ground>0</on-ground>
@ -58,6 +58,7 @@ Both KSFO (San Francisco International) and KHAF (Half Moon Bay) are within glid
<step>
<message>We're happily cruising along, enjoying an evenings flight.</message>
<wait>10</wait>
</step>
<step>

View file

@ -62,12 +62,14 @@ weather, the altimeter setting and the runway in use.
<step>
<message>In this lesson, you'll learn how to tune the radio to the Livermore ATIS.
The radio is in the middle of the center console.</message>
<wait>10</wait>
</step>
<step>
<message>There are 4 radios on this aircraft - two for communication (COMM1, COMM2) and two for navigation (NAV1, NAV2).
Each radio has an active frequency and a standby frequency.
We tune the radio by changing the standby frequency, and then swapping the active and standby. </message>
<wait>10</wait>
</step>
<step>
<message>To change the standby frequency, you can click on the left side of the knob to decrease it, and the right side to increase it. </message>

View file

@ -71,6 +71,7 @@ For more information on the before takeoff checklist, see Section 2-11 of the FA
</set>
<message>You can access the pre-takeoff checklist by pressing ?,
or selecting Help->Aircraft Help from the menu.</message>
<wait>10</wait>
</step>
<step>

View file

@ -7,6 +7,7 @@ This tutorial will take you through the pre-startup checklist and starting the C
</description>
<audio-dir>Aircraft/c172p/Tutorials/startup</audio-dir>
<timeofday>morning</timeofday>
<presets>
<airport-id>KLVK</airport-id>
<on-ground>1</on-ground>
@ -58,28 +59,31 @@ This tutorial will take you through the pre-startup checklist and starting the C
<step>
<message>Welcome to Livermore Municipal Airport. In this lesson we'll go through the pre-startup checks and start the aircraft.</message>
<wait>10</wait>
</step>
<step>
<message>Before we start up, we need to brief what we'll do in case of an engine fire on startup. As
this isn't our aircraft, and we're fully insured, we'll simply open the door and run away.</message>
<wait>10</wait>
</step>
<step>
<message>Next, we check our seatbelts, and seat adjustments. Cessnas can get worn seat rails that
sometimes cause the seat to slip backwards, often just as you take off, so make sure it is secure.</message>
<wait>10</wait>
</step>
<step>
<message>The fuel selector is set to BOTH, the Mixture control is fully rich, and the carb heat is off. </message>
<message>The fuel selector is set to BOTH, the Mixture control is fully rich, and the carb heat is off.</message>
<view>
<heading-offset-deg>347.2</heading-offset-deg>
<pitch-offset-deg>-21.8</pitch-offset-deg>
<heading-offset-deg>344.0</heading-offset-deg>
<pitch-offset-deg>-48.7</pitch-offset-deg>
<roll-offset-deg>0.0</roll-offset-deg>
<x-offset-m>-0.2</x-offset-m>
<y-offset-m>0.3</y-offset-m>
<z-offset-m>0.4</z-offset-m>
<field-of-view>55.0</field-of-view>
<y-offset-m>0.235</y-offset-m>
<z-offset-m>0.36</z-offset-m>
<field-of-view>37.0</field-of-view>
</view>
</step>
@ -138,6 +142,7 @@ This tutorial will take you through the pre-startup checklist and starting the C
<step>
<message>Now, we'll check no-one is about to walk into our propeller.</message>
<wait>2</wait>
<view>
<heading-offset-deg>44.0</heading-offset-deg>
<pitch-offset-deg>-15.7</pitch-offset-deg>
@ -151,6 +156,7 @@ This tutorial will take you through the pre-startup checklist and starting the C
<step>
<message>Looks clear.</message>
<wait>2</wait>
<view>
<heading-offset-deg>296.6</heading-offset-deg>
<pitch-offset-deg>-10.4</pitch-offset-deg>
@ -183,6 +189,10 @@ This tutorial will take you through the pre-startup checklist and starting the C
<property>/sim/panel-hotspots</property>
<value>true</value>
</set>
<set>
<property>/sim/model/hide-yoke</property>
<value>true</value>
</set>
<error>
<message>Click the middle hotspot three times, so both magnetos are on and the key
is set to BOTH.</message>
@ -262,6 +272,10 @@ This tutorial will take you through the pre-startup checklist and starting the C
<property>/sim/panel-hotspots</property>
<value>false</value>
</set>
<set>
<property>/sim/model/hide-yoke</property>
<value>false</value>
</set>
<error>
<message>You can release the starter motor now - the engine is running</message>
<condition>

View file

@ -61,6 +61,7 @@ This tutorial will teach you how to take-off, and climb at 600 feet per minute.
nose-wheel steering and rudder. As the aircraft takes off, you will use the ailerons and elevator
to control the direction and attitude of the aircraft.
</message>
<wait>10</wait>
</step>
<step>
@ -69,6 +70,7 @@ This tutorial will teach you how to take-off, and climb at 600 feet per minute.
in "yoke" mode with the left mouse button held down.
To switch the mouse to yoke mode, press the right mouse button until it displays as a + sign.
</message>
<wait>10</wait>
</step>
<step>

View file

@ -96,6 +96,7 @@ For more information on taxiing, see Section 2-9 of the FAA Airplane Flying Hand
<step>
<message>In this lesson we'll taxi the aircraft from its parking
position infront of the FBO, along taxiways Juliet and Alpha to the run-up area near runway 07L.</message>
<wait>10</wait>
</step>
<step>

View file

@ -38,10 +38,13 @@ in detail below:
tutorial selection dialog
<description>...</description> mandatory; longer description for the dialog
<audio-dir>...</audio-dir> optional; defines where to load sound samples
<interval>5</interval> optional; defines default loop interval in sec
<timeofday>noon</timeofday> optional; defines daytime; any of "dawn",
"morning", "noon", "afternoon",
"evening", "dusk", "midnight", "real"
<step-time> optional; period between each step being executed. Default 5
<exit-time> optional; period between exit/abort conditions being checked. Default 1
<nasal>
... optional; initial Nasal code; see below
</nasal>
@ -72,10 +75,7 @@ in detail below:
<nasal>
... optional; Nasal code
</nasal>
<interval>10</interval> optional; run loop next in this many seconds
</init> (default: 5); doesn't change global
interval
</init>
<step> mandatory; well, not really, but if there's not
at least one <step>, then the whole tutorial
@ -100,7 +100,7 @@ in detail below:
... optional; Nasal code that is executed when the
</nasal> step is entered
<interval>10</interval> optional; run loop next in this many seconds
<wait>10</wait> optional; wait period after initial messages etc.
<error> optional; allowed several times
<message>..</message> optional; text displayed/spoken
@ -113,8 +113,6 @@ in detail below:
<nasal>
... optional; Nasal code that is executed when the
</nasal> error condition was fulfilled
<interval>10</interval> optional; run loop next in this many seconds
</error>
<exit> optional; defines when to leave this <step>

View file

@ -43,6 +43,17 @@
<reflection-fresnel type="float"> 0.0 </reflection-fresnel>
<reflection-rainbow type="float"> 0.0 </reflection-rainbow>
<reflection-noise type="float"> 0.0 </reflection-noise>
<texture n= "5" >
<type>cubemap</type>
<images>
<positive-x>Aircraft/Generic/Effects/CubeMaps/fgfs-sky/1.png</positive-x>
<negative-x>Aircraft/Generic/Effects/CubeMaps/fgfs-sky/4.png</negative-x>
<positive-y>Aircraft/Generic/Effects/CubeMaps/fgfs-sky/2.png</positive-y>
<negative-y>Aircraft/Generic/Effects/CubeMaps/fgfs-sky/3.png</negative-y>
<positive-z>Aircraft/Generic/Effects/CubeMaps/fgfs-sky/6.png</positive-z>
<negative-z>Aircraft/Generic/Effects/CubeMaps/fgfs-sky/5.png</negative-z>
</images>
</texture>
<!--Ambient correction -->
<ambient-correction type="float"> 0.0 </ambient-correction>
<dirt-enabled type="int"> 0 </dirt-enabled>
@ -86,7 +97,7 @@
<fogstructure><use>/environment/fog-structure</use></fogstructure>
<!-- END fog include -->
</parameters>
<!-- Atmospheric scattering technique -->
<technique n="5">
<predicate>
@ -106,7 +117,7 @@
</or>
</and>
</predicate>
<pass>
<lighting>true</lighting>
<material>
@ -239,7 +250,7 @@
<write-mask type="bool">false</write-mask>
</depth>
</pass>
</technique>
</technique>
<technique n="8">
<pass>

View file

@ -340,29 +340,41 @@
<pass>
<name>sky-clouds</name>
<debug-property>/sim/rendering/rembrandt/debug/lighting/sky</debug-property>
</pass>
<pass>
<name>ambient</name>
<type>fullscreen</type>
<effect>Effects/ambient</effect>
<order-num>1</order-num>
<debug-property>/sim/rendering/rembrandt/debug/lighting/ambient</debug-property>
</pass>
<pass>
<name>sunlight</name>
<type>fullscreen</type>
<effect>Effects/sunlight</effect>
<order-num>2</order-num>
</pass>
<pass>
<name>lights</name>
<order-num>3</order-num>
<debug-property>/sim/rendering/rembrandt/debug/lighting/sunlight</debug-property>
</pass>
<pass>
<name>fog</name>
<type>fullscreen</type>
<effect>Effects/fog</effect>
<order-num>4</order-num>
<order-num>3</order-num>
<debug-property>/sim/rendering/rembrandt/debug/lighting/fog</debug-property>
</pass>
<pass>
<name>lights</name>
<order-num>4</order-num>
<debug-property>/sim/rendering/rembrandt/debug/lighting/lights</debug-property>
</pass>
<!-- pass>
<name>debug</name>
<type>fullscreen</type>
<effect>Effects/debug</effect>
<order-num>5</order-num>
<debug-property>/sim/rendering/rembrandt/debug/lighting/debug</debug-property>
</pass -->
</stage>
<stage>

View file

@ -12,7 +12,7 @@
<destination>one-minus-src-alpha</destination>
</blend>
<render-bin>
<bin-number>10000</bin-number>
<bin-number>1</bin-number>
<bin-name>RenderBin</bin-name>
</render-bin>
<texture-unit>

View file

@ -8,7 +8,24 @@
<g_sample_rad type="float">0.03</g_sample_rad>
<random_size type="float">800.0</random_size>
</parameters>
<technique n="11">
<technique n="10">
<predicate>
<and>
<or>
<less-equal>
<value type="float">2.0</value>
<glversion/>
</less-equal>
<and>
<extension-supported>GL_ARB_shader_objects</extension-supported>
<extension-supported>GL_ARB_shading_language_100</extension-supported>
<extension-supported>GL_ARB_vertex_shader</extension-supported>
<extension-supported>GL_ARB_fragment_shader</extension-supported>
</and>
</or>
<extension-supported>GL_EXT_gpu_shader4</extension-supported>
</and>
</predicate>
<pass>
<texture-unit>
<unit>0</unit>
@ -81,4 +98,77 @@
</uniform>
</pass>
</technique>
<technique n="11">
<pass>
<texture-unit>
<unit>0</unit>
<type>buffer</type>
<name>depth</name>
</texture-unit>
<texture-unit>
<unit>1</unit>
<type>buffer</type>
<name>normal</name>
</texture-unit>
<texture-unit>
<unit>2</unit>
<type>buffer</type>
<name>spec-emis</name>
</texture-unit>
<texture-unit>
<unit>3</unit>
<type>noise</type>
</texture-unit>
<program>
<vertex-shader>Shaders/ssao.vert</vertex-shader>
<fragment-shader>Shaders/ssao-ati.frag</fragment-shader>
<fragment-shader>Shaders/gbuffer-functions.frag</fragment-shader>
</program>
<uniform>
<name>depth_tex</name>
<type>sampler-2d</type>
<value type="int">0</value>
</uniform>
<uniform>
<name>normal_tex</name>
<type>sampler-2d</type>
<value type="int">1</value>
</uniform>
<uniform>
<name>spec_emis_tex</name>
<type>sampler-2d</type>
<value type="int">2</value>
</uniform>
<uniform>
<name>noise_tex</name>
<type>sampler-2d</type>
<value type="int">3</value>
</uniform>
<uniform>
<name>g_scale</name>
<type>float</type>
<value><use>g_scale</use></value>
</uniform>
<uniform>
<name>g_bias</name>
<type>float</type>
<value><use>g_bias</use></value>
</uniform>
<uniform>
<name>g_intensity</name>
<type>float</type>
<value><use>g_intensity</use></value>
</uniform>
<uniform>
<name>g_sample_rad</name>
<type>float</type>
<value><use>g_sample_rad</use></value>
</uniform>
<uniform>
<name>random_size</name>
<type>float</type>
<value><use>random_size</use></value>
</uniform>
</pass>
</technique>
</PropertyList>

View file

@ -2,8 +2,8 @@
# ---------------------------------------------------------------------------------------
var step_interval = 0.0; # time between tutorial steps (default is set below)
var exit_interval = 0.0; # time between fulfillment of a step and the start of the next step (default is set below)
var step_interval = 0; # time between tutorial steps (default is set below)
var exit_interval = 0; # time between fulfillment of a step and the start of the next step (default is set below)
var loop_id = 0;
var tutorialN = nil;
@ -67,8 +67,8 @@ var startTutorial = func {
last_step_time = time_elapsedN.getValue();
steps = tutorialN.getChildren("step");
step_interval = read_double(tutorialN, "step-time", 5.0); # time between tutorial steps
exit_interval = read_double(tutorialN, "exit-time", 1.0); # time between fulfillment of steps
step_interval = read_int(tutorialN, "step-time", 5); # time between tutorial steps
exit_interval = read_int(tutorialN, "exit-time", 1); # time between fulfillment of steps
run_nasal(tutorialN);
set_models(tutorialN.getNode("models"));
@ -133,9 +133,12 @@ var stopTutorial = func {
# - Otherwise display the instructions for the step.
#
var step_tutorial = func(id) {
# Check to ensure that this is the currently running tutorial.
id == loop_id or return;
var continue_after = func(n, dflt) {
settimer(func { step_tutorial(id) }, read_double(n, "wait", dflt));
var continue_after = func(n, w) {
settimer(func { step_tutorial(id) }, w);
}
# <end>
@ -159,7 +162,10 @@ var step_tutorial = func(id) {
step_countN.setIntValue(step_iter_count = 0);
do_group(step, "Tutorial step " ~ current_step);
return continue_after(step, step_interval);
# A <wait> tag affects only the initial entry to the step
var w = read_int(step, "wait", step_interval);
return continue_after(step, w);
}
step_countN.setIntValue(step_iter_count += 1);
@ -221,12 +227,11 @@ var do_group = func(node, default_msg = nil) {
run_nasal(node);
}
var read_double = func(node, child, default) {
var read_int = func(node, child, default) {
var c = node.getNode(child);
if (c == nil)
return default;
c = c.getValue();
c = int(c.getValue());
return c != nil ? c : default;
}

63
Shaders/ssao-ati.frag Normal file
View file

@ -0,0 +1,63 @@
#version 120
uniform sampler2D normal_tex;
uniform sampler2D depth_tex;
uniform sampler2D spec_emis_tex;
uniform sampler3D noise_tex;
uniform vec2 fg_BufferSize;
uniform vec3 fg_Planes;
uniform vec4 fg_du;
uniform vec4 fg_dv;
uniform float g_scale;
uniform float g_bias;
uniform float g_intensity;
uniform float g_sample_rad;
uniform float random_size;
uniform int osg_FrameNumber;
varying vec4 ray;
const vec2 v[4] = vec2[](vec2(1.0,0.0),vec2(-1.0,0.0),vec2(0.0,1.0),vec2(0.0,-1.0));
vec3 position( vec3 viewDir, vec2 coords, sampler2D depth_tex );
vec3 normal_decode(vec2 enc);
vec2 getRandom( in vec2 uv ) {
int level = osg_FrameNumber - ((osg_FrameNumber / 64) * 64);
return normalize( texture3D( noise_tex, vec3(uv*50.0, float(level) / 64.0) ).xy * 0.14 - 0.07 );
}
vec3 getPosition(in vec2 uv, in vec2 uv0, in vec4 ray0) {
vec2 duv = uv - uv0;
vec4 ray = ray0 + fg_du * duv.x + fg_dv * duv.y;
vec3 viewDir = normalize( ray.xyz );
return position(viewDir, uv, depth_tex);
}
float doAmbientOcclusion(in vec2 tcoord, in vec2 uv, in vec3 p, in vec3 cnorm, in vec4 ray) {
vec3 diff = getPosition(tcoord+uv,tcoord,ray)-p;
float d = length(diff);
vec3 v = diff / d;
d *= g_scale;
return max(0.0, dot( cnorm,v ) - g_bias) * (1.0/(1.0+d)) * g_intensity;
}
void main() {
vec2 coords = gl_TexCoord[0].xy;
float initialized = texture2D( spec_emis_tex, coords ).a;
if ( initialized < 0.1 )
discard;
vec3 normal = normal_decode(texture2D( normal_tex, coords ).rg);
vec3 viewDir = normalize(ray.xyz);
vec3 pos = position(viewDir, coords, depth_tex);
vec2 rand = getRandom(coords);
float ao = 0.0;
float rad = g_sample_rad;
int iterations = 4;
for (int j = 0; j < 1; ++j ) {
vec2 coord1 = reflect( v[j], rand ) * rad;
vec2 coord2 = vec2( coord1.x*0.707 - coord1.y*0.707, coord1.x*0.707 + coord1.y*0.707 );
ao += doAmbientOcclusion(coords,coord1*0.25,pos,normal,ray);
ao += doAmbientOcclusion(coords,coord2*0.5,pos,normal,ray);
ao += doAmbientOcclusion(coords,coord1*0.75,pos,normal,ray);
ao += doAmbientOcclusion(coords,coord2,pos,normal,ray);
}
ao /= 16.0;
gl_FragColor = vec4( vec3(1.0 - ao), 1.0 );
}

View file

@ -1,4 +1,5 @@
#version 120
#extension GL_EXT_gpu_shader4 : enable
uniform sampler2D normal_tex;
uniform sampler2D depth_tex;
uniform sampler2D spec_emis_tex;
@ -12,7 +13,7 @@ uniform float g_bias;
uniform float g_intensity;
uniform float g_sample_rad;
uniform float random_size;
uniform int osg_FrameNumber;
uniform unsigned int osg_FrameNumber;
varying vec4 ray;
@ -22,7 +23,7 @@ vec3 position( vec3 viewDir, vec2 coords, sampler2D depth_tex );
vec3 normal_decode(vec2 enc);
vec2 getRandom( in vec2 uv ) {
int level = osg_FrameNumber - ((osg_FrameNumber / 64) * 64);
unsigned int level = osg_FrameNumber - ((osg_FrameNumber / 64U) * 64U);
return normalize( texture3D( noise_tex, vec3(uv*50.0, float(level) / 64.0) ).xy * 0.14 - 0.07 );
}
vec3 getPosition(in vec2 uv, in vec2 uv0, in vec4 ray0) {

View file

@ -90,6 +90,17 @@ Started September 2000 by David Megginson, david@megginson.com
<enabled type="bool" userarchive="y">true</enabled>
<name userarchive="y">diffuse</name>
</debug-buffer>
<debug>
<lighting>
<sky type="bool">true</sky>
<ambient type="bool">true</ambient>
<sunlight type="bool">true</sunlight>
<lights type="bool">true</lights>
<fog type="bool">true</fog>
<debug type="bool">false</debug>
<transparent type="bool">false</transparent>
</lighting>
</debug>
</rembrandt>
<debug type="bool">false</debug>
<realism type="int">5</realism>