diff --git a/data/shaders/instanced_shadowref.frag b/data/shaders/instanced_shadowref.frag index f303688b6..c9be0f7eb 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((2. * gl_FragCoord.z - 1.) / gl_FragCoord.w); + FragColor = vec4(exp(80. * (2. * gl_FragCoord.z - 1.) / gl_FragCoord.w)); } diff --git a/data/shaders/shadow.frag b/data/shaders/shadow.frag index 128b3e31c..ffa59b9ee 100644 --- a/data/shaders/shadow.frag +++ b/data/shaders/shadow.frag @@ -2,5 +2,5 @@ out vec4 FragColor; void main() { - FragColor = vec4((2. * gl_FragCoord.z - 1.) / gl_FragCoord.w); + FragColor = vec4(exp(80. * (2. * gl_FragCoord.z - 1.) / gl_FragCoord.w)); } diff --git a/data/shaders/shadowref.frag b/data/shaders/shadowref.frag index ec6905c6d..915667c9c 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((2. * gl_FragCoord.z - 1.) / gl_FragCoord.w); + FragColor = vec4(exp(80. * (2. * gl_FragCoord.z - 1.) / gl_FragCoord.w)); } diff --git a/data/shaders/sunlightshadow.frag b/data/shaders/sunlightshadow.frag index 346f33f1c..30c98cd8e 100644 --- a/data/shaders/sunlightshadow.frag +++ b/data/shaders/sunlightshadow.frag @@ -56,7 +56,7 @@ float getShadowFactor(vec3 pos, float bias, int index) float z = texture(shadowtex, vec3(shadowtexcoord, float(index))).x; float d = shadowcoord.z; - return min(exp(1024 *(z - d)), 1.); + return min(pow(exp(-80. * d) * z, 4.), 1.); } void main() { diff --git a/src/graphics/render_geometry.cpp b/src/graphics/render_geometry.cpp index 13d2505c6..93f8e9345 100644 --- a/src/graphics/render_geometry.cpp +++ b/src/graphics/render_geometry.cpp @@ -1020,7 +1020,7 @@ void IrrDriver::renderShadows() } } - m_post_processing->renderGaussian6BlurLayer(m_rtts->getShadowFBO()); +// m_post_processing->renderGaussian6BlurLayer(m_rtts->getShadowFBO()); glBindTexture(GL_TEXTURE_2D_ARRAY, m_rtts->getShadowFBO().getRTT()[0]); glGenerateMipmap(GL_TEXTURE_2D_ARRAY); }