Changed lines in the terrain_2_0.fx:
Version 1.0 & 1.1
Start of file:
Code:
const float3 GREYIFY = float3( 0.623529, 0.619607, 0.623529 ); //changed FoW color, terrain map
//const float3 GREYIFY = float3( 0.212671, 0.715160, 0.072169 ); ////////original line
//float3 ApplyFOWColor( float3 c, float FOW ) //// this section is outcommented for the new terrain fow adjustment
//{
// float Grey = dot( c.rgb, GREYIFY );
// return lerp( Grey.rrr * 0.4, c.rgb, FOW > 0.8 ? 1.0 : 0.3 );
//}
Map fragment shaders:
Code:
float4 PixelShader_Map2_0_General( VS_MAP_OUTPUT v ) : COLOR
{
TILE_STRUCT s;
s.vTexCoord1 = v.vTexCoord1;
s.vColorTexCoord = v.vColorTexCoord;
s.vTerrainIndexColor = v.vTerrainIndexColor;
s.vTexCoord0 = v.vTexCoord0.xy;
float4 TerrainColor = GenerateTiles( s );
//float Grey = dot( TerrainColor.rgb, GREYIFY ); ////////original line
//TerrainColor.rgb = Grey; ////////original line
//TerrainColor *= White; ////////original line
float2 vProvinceUV = v.vProvinceId + 0.5f;
vProvinceUV /= PROVINCE_LOOKUP_SIZE;
float4 Color1 = tex2D( GeneralTexture, vProvinceUV ) - 0.7;
float4 Color2 = tex2D( GeneralTexture2, vProvinceUV ) - 0.7;
float vColor = tex2D( StripesTexture, v.vTerrainTexCoord ).a;
//float4 Color = lerp(Color1, Color2, vColor); ////////original line
float4 Color = Color2 * vColor + Color1 * ( 0.775 - vColor ); ////////0.775 value changes greyness
Color.rgb = lerp(White, Color.rgb, 0.575); ////////intransparent political map, color intensity= 0.575
Color.rgb *= COLOR_LIGHTNESS - 0.225; ////////intransparent political map, brightness= 0.225
//Color.rgb = lerp(TerrainColor.rgb, Color.rgb, 0.3); ////////original line
//Color.rgb *= COLOR_LIGHTNESS; ////////original line
////////no alpha value changing necessary here
return Color;
}
Code:
float4 PixelShader_Map2_0( VS_MAP_OUTPUT v ) : COLOR
{
TILE_STRUCT s;
s.vTexCoord1 = v.vTexCoord1;
s.vColorTexCoord = v.vColorTexCoord;
s.vTerrainIndexColor = v.vTerrainIndexColor;
s.vTexCoord0 = v.vTexCoord0.xy;
float4 OutColor = GenerateTiles( s );
OutColor.rgb *= LIGHTNESS;
float2 vProvinceUV = v.vProvinceId + 0.5f;
vProvinceUV /= PROVINCE_LOOKUP_SIZE;
float4 FogColor = tex2D( GeneralTexture, vProvinceUV );
//Winter
float Grey = dot( OutColor.rgb, GREYIFY );
OutColor.rgb = lerp( OutColor.rgb, Grey.rrr, FogColor.b );
OutColor.rgb += float3(FogColor.b,FogColor.b,FogColor.b)*0.3;
// FOW /////////////////
OutColor.rgb *= lerp(0.65, 1.0, FogColor.r); ////////NEW FOW Adjustment for terrain map 0.65 value changes fow
//OutColor.rgb = ApplyFOWColor( OutColor.rgb, FogColor.r); ////////outcommented original line
OutColor.rgb += FogColor.g;
///////////////////
return OutColor;
}
Beach shader:
Code:
float4 PixelShader_Beach_General( VS_OUTPUT_BEACH v ) : COLOR
{
TILE_STRUCT s;
s.vTexCoord1 = v.vColorTexCoord;
s.vColorTexCoord = v.vBorderTexCoord0;
s.vTerrainIndexColor = v.vTerrainIndexColor;
s.vTexCoord0 = v.vTexCoordBase;
float4 y1 = GenerateTiles( s );
/////////////////
//float Grey = dot( y1.rgb, GREYIFY ); ////////original line
//y1.rgb = Grey * White; ////////original line
float2 borderoffset = v.vBorderOffsetColor.rg + float2(-0.001/256,0);
float4 Color1 = tex2D( GeneralTexture, borderoffset );
float4 Color2 = tex2D( GeneralTexture2, borderoffset );
float vColor = tex2D( StripesTexture, v.vTerrainIndexColor ).a;
//float4 Color = lerp( Color1, Color2, vColor ) - 0.7; ////////original line
float4 Color = Color2 * vColor + Color1 * ( 0.755 - vColor ); ////////0.755 value changes greyness
Color.rgb = lerp(White, Color.rgb, 0.825); ////////intransparent political map, color intensity= 0.825
Color.rgb *= COLOR_LIGHTNESS - 0.325; ////////intransparent political map, brightness= 0.325
//Color.rgb = lerp(y1.rgb, Color.rgb, 0.3); ////////original line
//Color.rgb *= COLOR_LIGHTNESS; ////////original line
Color.a = 0.755; /////Adjust sea border alpha by adjusting value 0.755
//Color.a = 1; ////////original line
return Color;
}
Beach shader 2:
Code:
float4 PixelShader_Beach( VS_OUTPUT_BEACH v ) : COLOR
{
TILE_STRUCT s;
s.vTexCoord1 = v.vColorTexCoord;
s.vColorTexCoord = v.vBorderTexCoord0;
s.vTerrainIndexColor = v.vTerrainIndexColor;
s.vTexCoord0 = v.vTexCoordBase;
float4 OutColor = GenerateTiles( s );
OutColor.rgb *= LIGHTNESS;
//return OutColor;
// FOW /////////////////
float3 FogColor = tex2D( GeneralTexture, v.vBorderOffsetColor.rg + float2(-0.001/256,0)).rgb;
OutColor.rgb *= lerp(0.65, 1.0, FogColor.r); ////////NEW FOW Adjustment for terrain map 0.65 value changes fow
//OutColor.rgb = ApplyFOWColor( OutColor.rgb, FogColor.r); ////////original line
OutColor.rgb += FogColor.g*1.1;
//Winter
float Grey = dot( OutColor.rgb, GREYIFY );
OutColor.rgb = lerp( OutColor.rgb, Grey.rrr, FogColor.b );
OutColor.rgb += float3(FogColor.b,FogColor.b,FogColor.b)*0.3;
OutColor.rgb *= LIGHTNESS;
return OutColor;
}