1
0
Fork 0

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

This commit is contained in:
Vivian Meazza 2012-04-01 23:24:55 +01:00
commit 20d56b85f1
6 changed files with 52598 additions and 51683 deletions

File diff suppressed because it is too large Load diff

View file

@ -41,11 +41,6 @@
<object-name>fuselage_1</object-name> <object-name>fuselage_1</object-name>
</effect> </effect>
<effect>
<inherits-from>Effects/model-transparent</inherits-from>
<object-name>Propeller.Fast</object-name>
</effect>
<effect> <effect>
<inherits-from>Aircraft/c172p/Models/Effects/bumpspec-tail</inherits-from> <inherits-from>Aircraft/c172p/Models/Effects/bumpspec-tail</inherits-from>
<object-name>vstab</object-name> <object-name>vstab</object-name>
@ -55,6 +50,14 @@
<object-name>elevatorright</object-name> <object-name>elevatorright</object-name>
</effect> </effect>
<!-- Transparent Surfaces for Rembrandt rendering -->
<effect>
<inherits-from>Effects/model-transparent</inherits-from>
<object-name>glas</object-name>
<object-name>rightwindow</object-name>
<object-name>leftwindow</object-name>
<object-name>Propeller.Fast</object-name>
</effect>
<!-- Immatriculatoin --> <!-- Immatriculatoin -->
<model> <model>
<path>Aircraft/c172p/Models/Immat/immat.xml</path> <path>Aircraft/c172p/Models/Immat/immat.xml</path>
@ -2376,14 +2379,79 @@
</animation> </animation>
<!--Lights--> <!--Lights-->
<!-- Disable/enable different light types depending on rembrandt -->
<animation>
<type>select</type>
<object-name>LandingLightCone</object-name>
<condition>
<and>
<property>/sim/rendering/rembrandt</property>
<property>controls/lighting/landing-lights</property>
</and>
</condition>
</animation>
<!--landinglight--> <!--landinglight-->
<animation> <animation>
<type>select</type> <type>select</type>
<object-name>landinglight</object-name> <object-name>landinglight</object-name>
<object-name>landinglight2</object-name> <object-name>landinglight2</object-name>
<condition>
<and>
<property>controls/lighting/landing-lights</property>
<not>
<property>/sim/rendering/rembrandt</property>
</not>
</and>
</condition>
</animation>
<animation>
<type>light</type>
<light-type>spot</light-type>
<name>LandingLight</name>
<object-name>LandingLightCone</object-name>
<condition> <condition>
<property>controls/lighting/landing-lights</property> <property>controls/lighting/landing-lights</property>
</condition> </condition>
<position>
<x>-0.078</x>
<y>-3.086</y>
<z>0.536</z>
</position>
<direction>
<x>-29</x>
<y>6.76</y>
<z>-3.6</z>
</direction>
<ambient>
<r>0.03</r>
<g>0.03</g>
<b>0.03</b>
<a>1.0</a>
</ambient>
<diffuse>
<r>0.7</r>
<g>0.7</g>
<b>0.6</b>
<a>1.0</a>
</diffuse>
<specular>
<r>0.7</r>
<g>0.7</g>
<b>0.7</b>
<a>1.0</a>
</specular>
<attenuation>
<c>1.0</c>
<l>0.002</l>
<q>0.00005</q>
</attenuation>
<exponent>30.0</exponent>
<cutoff>40</cutoff>
<near-m>2</near-m>
<far-m>50</far-m>
</animation> </animation>
<animation> <animation>

View file

@ -140,6 +140,9 @@ please see Docs/README.model-combined.eff for documentation
<fogtype> <fogtype>
<use>/sim/rendering/shaders/skydome</use> <use>/sim/rendering/shaders/skydome</use>
</fogtype> </fogtype>
<rembrandt>
<use>/sim/rendering/rembrandt</use>
</rembrandt>
<!-- END fog include --> <!-- END fog include -->
</parameters> </parameters>
@ -752,6 +755,13 @@ please see Docs/README.model-combined.eff for documentation
</value> </value>
</uniform> </uniform>
<!-- END fog include --> <!-- END fog include -->
<uniform>
<name>rembrandt_enabled</name>
<type>int</type>
<value>
<use>rembrandt</use>
</value>
</uniform>
</pass> </pass>
</technique> </technique>
@ -1360,7 +1370,13 @@ please see Docs/README.model-combined.eff for documentation
</value> </value>
</uniform> </uniform>
<!-- END fog include --> <!-- END fog include -->
<uniform>
<name>rembrandt_enabled</name>
<type>int</type>
<value>
<use>rembrandt</use>
</value>
</uniform>
</pass> </pass>
</technique> </technique>
</PropertyList> </PropertyList>

View file

@ -972,12 +972,12 @@ var rain = {
me.flowN.setDoubleValue(ias < me.threshold ? 0 : time * 0.5 + ias * NM2M * dt / 3600); me.flowN.setDoubleValue(ias < me.threshold ? 0 : time * 0.5 + ias * NM2M * dt / 3600);
me.rainingN.setDoubleValue(me.rain); me.rainingN.setDoubleValue(me.rain);
if (enableN.getBoolValue()) if (me.enableN.getBoolValue())
me.enableN.setBoolValue(0); me.enableN.setBoolValue(0);
} else { } else {
me.flowN.setDoubleValue(0); me.flowN.setDoubleValue(0);
me.rainingN.setDoubleValue(0); me.rainingN.setDoubleValue(0);
if (enableN.getBoolValue() != 1) if (me.enableN.getBoolValue() != 1)
me.enableN.setBoolValue(1); me.enableN.setBoolValue(1);
} }
}, },

View file

@ -75,7 +75,7 @@ void main (void)
//vec3 ambient = fg_SunAmbientColor.rgb; //vec3 ambient = fg_SunAmbientColor.rgb;
vec3 N; vec3 N;
vec3 dotN; vec3 dotN;
float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb, vec3( 0.3, 0.59, 0.11 ) ); float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb + gl_FrontMaterial.emission , vec3( 0.3, 0.59, 0.11 ) );
float pf; float pf;
///BEGIN bump ///BEGIN bump
@ -94,7 +94,7 @@ void main (void)
float v = dot(viewVec, normalize(VNormal));// Map a rainbowish color float v = dot(viewVec, normalize(VNormal));// Map a rainbowish color
vec4 fresnel = texture2D(ReflFresnelTex, vec2(v, 0.0)); vec4 fresnel = texture2D(ReflFresnelTex, vec2(v, 0.0));
vec4 rainbow = texture2D(ReflRainbowTex, vec2(v, 0.0)); vec4 rainbow = texture2D(ReflRainbowTex, vec2(v, 0.0));
vec4 color = gl_Color + gl_FrontMaterial.diffuse; vec4 color = gl_Color * gl_FrontMaterial.diffuse;
float specular = dot((gl_FrontMaterial.specular * nmap.a).rgb, vec3( 0.3, 0.59, 0.11 )); float specular = dot((gl_FrontMaterial.specular * nmap.a).rgb, vec3( 0.3, 0.59, 0.11 ));
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

View file

@ -21,6 +21,7 @@ uniform float hdg;
uniform int refl_dynamic; uniform int refl_dynamic;
uniform int nmap_enabled; uniform int nmap_enabled;
uniform int shader_qual; uniform int shader_qual;
uniform int rembrandt_enabled;
//////Fog Include/////////// //////Fog Include///////////
// uniform int fogType; // uniform int fogType;
@ -101,8 +102,11 @@ void main(void)
reflVec = reflVec_stat; reflVec = reflVec_stat;
} }
if(rembrandt_enabled < 1){
gl_FrontColor = gl_FrontMaterial.emission + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient); gl_FrontColor = gl_FrontMaterial.emission + gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient);
} else {
gl_FrontColor = gl_Color;
}
gl_Position = ftransform(); gl_Position = ftransform();
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
} }