Overlay texturing for airport keep with definitions for US Southwest
This commit is contained in:
parent
316ac64146
commit
17d792d9c3
3 changed files with 125 additions and 21 deletions
|
@ -11,7 +11,18 @@
|
|||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<grit-alpha>1.0</grit-alpha>
|
||||
<texture n="14">
|
||||
<image>Textures/Terrain/void.png</image>
|
||||
<type>2d</type>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>repeat</wrap-s>
|
||||
<wrap-t>repeat</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<use_overlay>0</use_overlay>
|
||||
<grit_alpha>1.0</grit_alpha>
|
||||
<overlay_bias>0.0</overlay_bias>
|
||||
<overlay_alpha>1.0</overlay_alpha>
|
||||
</parameters>
|
||||
|
||||
<technique n="2">
|
||||
|
@ -91,18 +102,14 @@
|
|||
</internal-format>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>1</unit>
|
||||
<type>noise</type>
|
||||
</texture-unit>
|
||||
<texture-unit>
|
||||
<unit>6</unit>
|
||||
<image><use>texture[10]/image</use></image>
|
||||
<type><use>texture[10]/type</use></type>
|
||||
<filter><use>texture[10]/filter</use></filter>
|
||||
<wrap-s><use>texture[10]/wrap-s</use></wrap-s>
|
||||
<wrap-t><use>texture[10]/wrap-t</use></wrap-t>
|
||||
<unit>1</unit>
|
||||
<image><use>texture[14]/image</use></image>
|
||||
<type><use>texture[14]/type</use></type>
|
||||
<filter><use>texture[14]/filter</use></filter>
|
||||
<wrap-s><use>texture[14]/wrap-s</use></wrap-s>
|
||||
<wrap-t><use>texture[14]/wrap-t</use></wrap-t>
|
||||
<internal-format>
|
||||
<use>texture[10]/internal-format</use>
|
||||
<use>texture[14]/internal-format</use>
|
||||
</internal-format>
|
||||
</texture-unit>
|
||||
<program>
|
||||
|
@ -185,6 +192,16 @@
|
|||
<type>float</type>
|
||||
<value><use>grit_alpha</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_bias</name>
|
||||
<type>float</type>
|
||||
<value><use>overlay_bias</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>overlay_alpha</name>
|
||||
<type>float</type>
|
||||
<value><use>overlay_alpha</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>cloud_self_shading</name>
|
||||
<type>float</type>
|
||||
|
@ -410,15 +427,20 @@
|
|||
<type>int</type>
|
||||
<value> <use>tquality_level</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>use_overlay</name>
|
||||
<type>int</type>
|
||||
<value> <use>use_overlay</use></value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">0</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>snow_texture</name>
|
||||
<name>overlay_texture</name>
|
||||
<type>sampler-2d</type>
|
||||
<value type="int">6</value>
|
||||
<value type="int">1</value>
|
||||
</uniform>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
|
|
|
@ -3642,18 +3642,48 @@
|
|||
<!-- REGIONAL DEFINITION US SOUTHWEST -->
|
||||
|
||||
|
||||
<material include="Materials/regions/us_southwest.xml">
|
||||
<material>
|
||||
<condition>
|
||||
<and>
|
||||
<equals>
|
||||
<property>sim/startup/season</property>
|
||||
<value>summer</value>
|
||||
</equals>
|
||||
<and>
|
||||
<greater-than>
|
||||
<property>position/longitude-deg</property>
|
||||
<value>-130.0</value>
|
||||
</greater-than>
|
||||
<less-than>
|
||||
<property>position/longitude-deg</property>
|
||||
<value>-119.0</value>
|
||||
</less-than>
|
||||
<greater-than>
|
||||
<property>position/latitude-deg</property>
|
||||
<value>32.0</value>
|
||||
</greater-than>
|
||||
<less-than>
|
||||
<property>position/latitude-deg</property>
|
||||
<value>42.0</value>
|
||||
</less-than>
|
||||
</and>
|
||||
</and>
|
||||
</condition>
|
||||
<effect>Effects/airfield</effect>
|
||||
<name>Grass</name>
|
||||
<name>Airport</name>
|
||||
<name>AirportKeep</name>
|
||||
<name>Greenspace</name>
|
||||
<texture-set>
|
||||
<texture>Terrain/sand_hires_red.png</texture>
|
||||
<texture n="13">Terrain/sand_hires_red.png</texture>
|
||||
<texture>Terrain/gravel_red.png</texture>
|
||||
<texture n="13">Terrain/gravel_red.png</texture>
|
||||
<texture n="14">Terrain/grass_dry2a.png</texture>
|
||||
</texture-set>
|
||||
<parameters>
|
||||
<grit_alpha>0.4</grit_alpha>
|
||||
<use_overlay>1</use_overlay>
|
||||
<overlay_bias>0.05</overlay_bias>
|
||||
<overlay_alpha>1.0</overlay_alpha>
|
||||
</parameters>
|
||||
<xsize>125</xsize>
|
||||
<ysize>125</ysize>
|
||||
|
@ -3677,6 +3707,48 @@
|
|||
<bumpiness>0.1</bumpiness>
|
||||
<load-resistance>1e30</load-resistance>
|
||||
</material>
|
||||
|
||||
|
||||
<material include="Materials/regions/us_southwest.xml">
|
||||
<effect>Effects/airfield</effect>
|
||||
<name>Grass</name>
|
||||
<name>Airport</name>
|
||||
<name>AirportKeep</name>
|
||||
<name>Greenspace</name>
|
||||
<texture-set>
|
||||
<texture>Terrain/gravel_red.png</texture>
|
||||
<texture n="13">Terrain/gravel_red.png</texture>
|
||||
<texture n="14">Terrain/grass_dry2.png</texture>
|
||||
</texture-set>
|
||||
<parameters>
|
||||
<grit_alpha>0.4</grit_alpha>
|
||||
<use_overlay>1</use_overlay>
|
||||
<overlay_bias>-0.1</overlay_bias>
|
||||
</parameters>
|
||||
<xsize>125</xsize>
|
||||
<ysize>125</ysize>
|
||||
<light-coverage>4000000.0</light-coverage>
|
||||
<diffuse>
|
||||
<r>0.93</r>
|
||||
<g>0.95</g>
|
||||
<b>0.93</b>
|
||||
<a>1.0</a>
|
||||
</diffuse>
|
||||
<specular>
|
||||
<r>0.1</r>
|
||||
<g>0.12</g>
|
||||
<b>0.1</b>
|
||||
<a>1.0</a>
|
||||
</specular>
|
||||
<shininess>1.2</shininess>
|
||||
<solid>1</solid>
|
||||
<friction-factor>0.7</friction-factor>
|
||||
<rolling-friction>0.1</rolling-friction>
|
||||
<bumpiness>0.1</bumpiness>
|
||||
<load-resistance>1e30</load-resistance>
|
||||
</material>
|
||||
|
||||
|
||||
|
||||
<material>
|
||||
<condition>
|
||||
|
|
|
@ -11,7 +11,8 @@ varying vec3 ecViewdir;
|
|||
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform sampler2D snow_texture;
|
||||
uniform sampler2D overlay_texture;
|
||||
|
||||
|
||||
varying float steepness;
|
||||
|
||||
|
@ -30,10 +31,13 @@ uniform float fogstructure;
|
|||
uniform float cloud_self_shading;
|
||||
uniform float snow_thickness_factor;
|
||||
uniform float grit_alpha;
|
||||
uniform float overlay_bias;
|
||||
uniform float overlay_alpha;
|
||||
uniform float wetness;
|
||||
uniform int quality_level;
|
||||
uniform int tquality_level;
|
||||
uniform int cloud_shadow_flag;
|
||||
uniform int use_overlay;
|
||||
|
||||
const float EarthRadius = 5800000.0;
|
||||
const float terminator_width = 200000.0;
|
||||
|
@ -170,9 +174,8 @@ float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist;
|
|||
else
|
||||
{halfVector = normalize(normalize(lightDir) + normalize(ecViewdir));}
|
||||
vec4 texel;
|
||||
vec4 overlay_texel;
|
||||
vec4 snow_texel;
|
||||
vec4 detail_texel;
|
||||
vec4 mix_texel;
|
||||
vec4 fragColor;
|
||||
vec4 specular = vec4(0.0);
|
||||
float intensity;
|
||||
|
@ -227,7 +230,14 @@ float noise_2000m = Noise2D(rawPos.xy, 2000.0);
|
|||
snow_texel.a = snow_texel.a * 0.2+0.8* smoothstep(0.2,0.8, 0.3 +noise_term + snow_thickness_factor +0.0001*(relPos.z +eye_alt -snowlevel) );
|
||||
}
|
||||
|
||||
|
||||
if (use_overlay == 1)
|
||||
{
|
||||
overlay_texel = texture2D(overlay_texture, gl_TexCoord[0].st * 4.0);
|
||||
|
||||
texel = mix(texel, overlay_texel, overlay_alpha * smoothstep(0.45, 0.65, overlay_bias + (0.5 * noise_1m + 0.1 * noise_2m + 0.4 * noise_10m)));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue