diff --git a/data/shaders/instanced_shadowref.frag b/data/shaders/instanced_shadowref.frag index bf296e7ea..ed5db4612 100644 --- a/data/shaders/instanced_shadowref.frag +++ b/data/shaders/instanced_shadowref.frag @@ -17,5 +17,5 @@ void main(void) vec4 col = texture(tex, uv); #endif if (col.a < 0.5) discard; - FragColor = vec4(exp(8. * (2. * gl_FragCoord.z - 1.) / gl_FragCoord.w)); + FragColor = vec4(exp(32. * (2. * gl_FragCoord.z - 1.) / gl_FragCoord.w)); } diff --git a/data/shaders/shadow.frag b/data/shaders/shadow.frag index 45118c085..01b4d3aaa 100644 --- a/data/shaders/shadow.frag +++ b/data/shaders/shadow.frag @@ -2,5 +2,5 @@ out vec4 FragColor; void main() { - FragColor = vec4(exp(8. * (2. * gl_FragCoord.z - 1.) / gl_FragCoord.w)); + FragColor = vec4(exp(32. * (2. * gl_FragCoord.z - 1.) / gl_FragCoord.w)); } diff --git a/data/shaders/shadowref.frag b/data/shaders/shadowref.frag index cce3b3be4..31cca01d8 100644 --- a/data/shaders/shadowref.frag +++ b/data/shaders/shadowref.frag @@ -12,5 +12,5 @@ void main(void) { vec4 col = texture(tex, uv); if (col.a < 0.5) discard; - FragColor = vec4(exp(8. * (2. * gl_FragCoord.z - 1.) / gl_FragCoord.w)); + FragColor = vec4(exp(32. * (2. * gl_FragCoord.z - 1.) / gl_FragCoord.w)); } diff --git a/data/shaders/sunlightshadow.frag b/data/shaders/sunlightshadow.frag index f242a309c..4e6babc99 100644 --- a/data/shaders/sunlightshadow.frag +++ b/data/shaders/sunlightshadow.frag @@ -34,7 +34,7 @@ float getShadowFactor(vec3 pos, float bias, int index) float z = texture(shadowtex, vec3(shadowtexcoord, float(index))).x; float d = shadowcoord.z; - return min(pow(exp(-8. * d) * z, 32.), 1.); + return min(pow(exp(-32. * d) * z, 8.), 1.); } void main() { diff --git a/src/graphics/render_geometry.cpp b/src/graphics/render_geometry.cpp index d94c2e176..3da8e2a39 100644 --- a/src/graphics/render_geometry.cpp +++ b/src/graphics/render_geometry.cpp @@ -1034,8 +1034,8 @@ void IrrDriver::renderShadows() for (unsigned i = 0; i < 2; i++) { m_post_processing->renderGaussian6BlurLayer(m_rtts->getShadowFBO(), i, - 1.5f * m_shadow_scales[0].first / m_shadow_scales[i].first, - 1.5f * m_shadow_scales[0].second / m_shadow_scales[i].second); + 2.f * m_shadow_scales[0].first / m_shadow_scales[i].first, + 2.f * m_shadow_scales[0].second / m_shadow_scales[i].second); } } glBindTexture(GL_TEXTURE_2D_ARRAY, m_rtts->getShadowFBO().getRTT()[0]);