Index: binaries/data/mods/public/shaders/glsl/terrain_common.fs =================================================================== --- binaries/data/mods/public/shaders/glsl/terrain_common.fs +++ binaries/data/mods/public/shaders/glsl/terrain_common.fs @@ -241,7 +241,12 @@ #endif float los = texture2D(losTex, v_los).a; - los = los < 0.03 ? 0.0 : los; + float oloss = los; + los += texture2D(losTex, v_los-vec2(0.01, 0.00)).a; + los += texture2D(losTex, v_los+vec2(0.01, 0.00)).a; + los += texture2D(losTex, v_los-vec2(0.00, 0.01)).a; + los += texture2D(losTex, v_los+vec2(0.00, 0.01)).a; + los = los < 0.03 ? 0.0 : los/5.0 * oloss; color *= los; #if DECAL Index: source/graphics/LOSTexture.cpp =================================================================== --- source/graphics/LOSTexture.cpp +++ source/graphics/LOSTexture.cpp @@ -330,7 +330,7 @@ recreated = true; } - PROFILE("recompute LOS texture"); + PROFILE3("recompute LOS texture"); std::vector losData; size_t pitch; @@ -399,13 +399,12 @@ *dataPtr++ = 0; // Horizontal blur: - for (size_t j = g_BlurSize/2; j < h + g_BlurSize/2; ++j) { for (size_t i = 0; i < w; ++i) { u8* d = &losData[i+j*pitch]; - *d = ( + *d = d[3] == 0 ? 0 : ( 1*d[0] + 6*d[1] + 15*d[2] + @@ -424,7 +423,7 @@ for (size_t i = 0; i < w; ++i) { u8* d = &losData[i+j*pitch]; - *d = ( + *d = d[3*pitch] == 0 ? 0 : ( 1*d[0*pitch] + 6*d[1*pitch] + 15*d[2*pitch] + Index: source/simulation2/helpers/Los.h =================================================================== --- source/simulation2/helpers/Los.h +++ source/simulation2/helpers/Los.h @@ -27,7 +27,7 @@ * This is the size, in meters, of every LOS tile. * (Note that this also means it is the minimal meaningful resolution of any vision range change). */ -static constexpr i32 LOS_TILE_SIZE = 4; +static constexpr i32 LOS_TILE_SIZE = 8; enum class LosState : u8 {