Merge branch 'master' of gitorious.org:fg/fgdata
This commit is contained in:
commit
093248ca3c
3 changed files with 61 additions and 56 deletions
|
@ -144,6 +144,27 @@ void main (void)
|
||||||
//END reflect
|
//END reflect
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
//begin DIRT
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
if (dirt_enabled > 0.0){
|
||||||
|
float dirtFactorR = reflmap.r * dirt_r_factor;
|
||||||
|
dirtFactorR = smoothstep(0.0, 1.0, dirtFactorR);
|
||||||
|
mixedcolor.rgb = mix(mixedcolor.rgb, dirt_r_color, dirtFactorR);
|
||||||
|
if (dirt_multi > 0) {
|
||||||
|
float dirtFactorG = reflmap.g * dirt_g_factor;
|
||||||
|
float dirtFactorB = reflmap.b * dirt_b_factor;
|
||||||
|
dirtFactorG = smoothstep(0.0, 1.0, dirtFactorG);
|
||||||
|
dirtFactorB = smoothstep(0.0, 1.0, dirtFactorB);
|
||||||
|
mixedcolor.rgb = mix(mixedcolor.rgb, dirt_g_color, dirtFactorG);
|
||||||
|
mixedcolor.rgb = mix(mixedcolor.rgb, dirt_b_color, dirtFactorB);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
//END Dirt
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
// set ambient adjustment to remove bluiness with user input
|
// set ambient adjustment to remove bluiness with user input
|
||||||
float ambient_offset = clamp(amb_correction, -1.0, 1.0);
|
float ambient_offset = clamp(amb_correction, -1.0, 1.0);
|
||||||
vec4 ambient_Correction = vec4(gl_LightSource[0].ambient.rg, gl_LightSource[0].ambient.b * 0.6, 0.5) * ambient_offset ;
|
vec4 ambient_Correction = vec4(gl_LightSource[0].ambient.rg, gl_LightSource[0].ambient.b * 0.6, 0.5) * ambient_offset ;
|
||||||
|
@ -152,25 +173,7 @@ void main (void)
|
||||||
color.a = texel.a * alpha;
|
color.a = texel.a * alpha;
|
||||||
vec4 fragColor = vec4(color.rgb * mixedcolor + ambient_Correction.rgb, color.a);
|
vec4 fragColor = vec4(color.rgb * mixedcolor + ambient_Correction.rgb, color.a);
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
//begin DIRT
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
if (dirt_enabled > 0.0){
|
|
||||||
float dirtFactorR = reflmap.r * dirt_r_factor;
|
|
||||||
dirtFactorR = smoothstep(0.0, 1.0, dirtFactorR);
|
|
||||||
fragColor.rgb = mix(fragColor.rgb, dirt_r_color, dirtFactorR);
|
|
||||||
if (dirt_multi > 0) {
|
|
||||||
float dirtFactorG = reflmap.g * dirt_g_factor;
|
|
||||||
float dirtFactorB = reflmap.b * dirt_b_factor;
|
|
||||||
dirtFactorG = smoothstep(0.0, 1.0, dirtFactorG);
|
|
||||||
dirtFactorB = smoothstep(0.0, 1.0, dirtFactorB);
|
|
||||||
fragColor.rgb = mix(fragColor.rgb, dirt_g_color, dirtFactorG);
|
|
||||||
fragColor.rgb = mix(fragColor.rgb, dirt_b_color, dirtFactorB);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
//END Dirt
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
fragColor += Specular * nmap.a;
|
fragColor += Specular * nmap.a;
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,8 @@
|
||||||
<enabled>false</enabled>
|
<enabled>false</enabled>
|
||||||
<legend>ICAO</legend>
|
<legend>ICAO</legend>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-assign</command>
|
<command>ATC-freq-display</command>
|
||||||
<property>/sim/atc/freq-airport</property>
|
<icao type="string">ICAO</icao>
|
||||||
<value type="string">ICAO</value>
|
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-close</command>
|
<command>dialog-close</command>
|
||||||
|
@ -60,6 +59,9 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-apply</command>
|
<command>dialog-apply</command>
|
||||||
</binding>
|
</binding>
|
||||||
|
<binding>
|
||||||
|
<command>ATC-freq-display</command>
|
||||||
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-close</command>
|
<command>dialog-close</command>
|
||||||
</binding>
|
</binding>
|
||||||
|
|
Loading…
Add table
Reference in a new issue