From be26ac7213b8c3792793a9544773360d77b4c652 Mon Sep 17 00:00:00 2001 From: vlj Date: Mon, 23 Jun 2014 00:24:02 +0200 Subject: [PATCH 1/2] Fix crash with intel --- src/graphics/rtts.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphics/rtts.cpp b/src/graphics/rtts.cpp index 7151bb3c7..4f4a4627d 100644 --- a/src/graphics/rtts.cpp +++ b/src/graphics/rtts.cpp @@ -42,7 +42,7 @@ static GLuint generateRTT(const core::dimension2du &res, GLint internalFormat, G glGenTextures(1, &result); glBindTexture(GL_TEXTURE_2D, result); #if WIN32 - if (irr_driver->getGLSLVersion() < 420) + if (irr_driver->getGLSLVersion() >= 420) glTexStorage2D(GL_TEXTURE_2D, mipmaplevel, internalFormat, res.Width, res.Height); else #endif From d2fc2581245f3524b680a636f8bb4e1fad3dd9f1 Mon Sep 17 00:00:00 2001 From: vlj Date: Mon, 23 Jun 2014 01:03:55 +0200 Subject: [PATCH 2/2] Tweak ssao (again) Random factor is less perdicable, no more spiral. --- data/shaders/ssao.frag | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/shaders/ssao.frag b/data/shaders/ssao.frag index 5409be0fb..445de5388 100644 --- a/data/shaders/ssao.frag +++ b/data/shaders/ssao.frag @@ -24,12 +24,12 @@ layout (std140) uniform MatrixesData out float AO; -const float sigma = 2.; +const float sigma = 1.; const float tau = 7.; const float beta = 0.001; const float epsilon = .00001; const float radius = 1.; -const float k = 5.; +const float k = 1.5; #define SAMPLES 16 @@ -56,7 +56,7 @@ void main(void) vec3 norm = -normalize(cross(ddy, ddx)); float r = radius / FragPos.z; - float phi = 30. * (x ^ y) + 10. * x * y; + float phi = 3. * (x ^ y) + x * y; float bl = 0.0; float m = log2(r) + 6 + log2(invSamples);