1
0
Fork 0

Fix tiling issues in Tropical South America airport keep definitions

This commit is contained in:
Thorsten Renk 2016-03-28 18:19:05 +03:00
parent 31c2312732
commit e9bac7dac4
3 changed files with 51 additions and 3 deletions

View file

@ -19,9 +19,19 @@
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<texture n="15">
<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>
<base_layer_magnification>5.0</base_layer_magnification>
<overlay_layer_magnification>4.0</overlay_layer_magnification>
<grain_layer_magnification>4.0</grain_layer_magnification>
<use_overlay>0</use_overlay>
<use_grain>0</use_grain>
<use_color_overlay>1</use_color_overlay>
<grit_alpha>1.0</grit_alpha>
<overlay_bias>0.0</overlay_bias>
@ -115,6 +125,17 @@
<use>texture[14]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit>
<unit>2</unit>
<image><use>texture[15]/image</use></image>
<type><use>texture[15]/type</use></type>
<filter><use>texture[15]/filter</use></filter>
<wrap-s><use>texture[15]/wrap-s</use></wrap-s>
<wrap-t><use>texture[15]/wrap-t</use></wrap-t>
<internal-format>
<use>texture[15]/internal-format</use>
</internal-format>
</texture-unit>
<program>
<vertex-shader>Shaders/terrain-ALS-ultra.vert</vertex-shader>
<fragment-shader>Shaders/airfield-ALS.frag</fragment-shader>
@ -219,6 +240,11 @@
<type>float</type>
<value><use>overlay_layer_magnification</use></value>
</uniform>
<uniform>
<name>grain_layer_magnification</name>
<type>float</type>
<value><use>grain_layer_magnification</use></value>
</uniform>
<uniform>
<name>cloud_self_shading</name>
<type>float</type>
@ -522,6 +548,11 @@
<type>int</type>
<value> <use>use_overlay</use></value>
</uniform>
<uniform>
<name>use_grain</name>
<type>int</type>
<value> <use>use_grain</use></value>
</uniform>
<uniform>
<name>use_color_overlay</name>
<type>int</type>
@ -567,6 +598,11 @@
<type>sampler-2d</type>
<value type="int">1</value>
</uniform>
<uniform>
<name>grain_texture</name>
<type>sampler-2d</type>
<value type="int">2</value>
</uniform>
<uniform>
<name>colorMode</name>
<type>int</type>

View file

@ -51,15 +51,18 @@
<texture-set>
<texture>Terrain/california-grass.png</texture>
<texture n="13">Terrain/california-grass.png</texture>
<texture n="14">Terrain/airport_grass_overlay.png</texture>
<texture n="14">Terrain/california-grass-hires.png</texture>
<texture n="15">Terrain/airport_grass_overlay.png</texture>
</texture-set>
<parameters>
<grit_alpha>0.4</grit_alpha>
<use_overlay>1</use_overlay>
<overlay_bias>0.5</overlay_bias>
<use_grain>1</use_grain>
<overlay_bias>0.0</overlay_bias>
<use_color_overlay>0</use_color_overlay>
<base_layer_magnification>1.0</base_layer_magnification>
<overlay_layer_magnification>4.0</overlay_layer_magnification>
<grain_layer_magnification>4.0</grain_layer_magnification>
</parameters>
<xsize>128</xsize>
<ysize>128</ysize>

View file

@ -12,7 +12,7 @@ varying vec3 ecViewdir;
uniform sampler2D texture;
uniform sampler2D overlay_texture;
uniform sampler2D grain_texture;
varying float steepness;
@ -35,6 +35,7 @@ uniform float overlay_bias;
uniform float overlay_alpha;
uniform float base_layer_magnification;
uniform float overlay_layer_magnification;
uniform float grain_layer_magnification;
uniform float wetness;
uniform float air_pollution;
uniform float season;
@ -46,6 +47,7 @@ uniform int quality_level;
uniform int tquality_level;
uniform int cloud_shadow_flag;
uniform int use_overlay;
uniform int use_grain;
uniform int use_color_overlay;
uniform int use_searchlight;
uniform int use_landing_light;
@ -119,6 +121,7 @@ float ct = dot(vec3(0.0, 0.0, 1.0), relPos)/dist;
{halfVector = normalize(normalize(lightDir) + normalize(ecViewdir));}
vec4 texel;
vec4 overlay_texel;
vec4 grain_texel;
vec4 snow_texel;
vec4 fragColor;
vec4 specular = vec4(0.0);
@ -184,6 +187,12 @@ if (use_overlay == 1)
}
if (use_grain == 1)
{
grain_texel = texture2D(grain_texture, gl_TexCoord[0].st * grain_layer_magnification);
texel.rgb = mix(texel.rgb, grain_texel.rgb, grain_texel.a);
}