From 6d152cacc908bba3e843fe48097bbf4c0db1b0b2 Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 4 Apr 2012 17:11:58 +0100 Subject: [PATCH 1/3] Fix for Ati(? Mac?) not allowing writes to 'varying' in a fragment shader. --- Shaders/deferred-gbuffer.frag | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Shaders/deferred-gbuffer.frag b/Shaders/deferred-gbuffer.frag index 929743349..f6068010e 100644 --- a/Shaders/deferred-gbuffer.frag +++ b/Shaders/deferred-gbuffer.frag @@ -15,8 +15,9 @@ void main() { float specular = dot( gl_FrontMaterial.specular.rgb, vec3( 0.3, 0.59, 0.11 ) ); float shininess = gl_FrontMaterial.shininess; float emission = dot( gl_FrontLightModelProduct.sceneColor.rgb, vec3( 0.3, 0.59, 0.11 ) ); - ecNormal = (2.0 * gl_Color.a - 1.0) * ecNormal; - gl_FragData[0] = vec4( (ecNormal.xy + vec2(1.0,1.0)) * 0.5, 0.0, 1.0 ); + + vec3 normal2 = (2.0 * gl_Color.a - 1.0) * ecNormal; + gl_FragData[0] = vec4( (normal2.xy + vec2(1.0,1.0)) * 0.5, 0.0, 1.0 ); gl_FragData[1] = vec4( gl_Color.rgb * texel.rgb, float( materialID ) / 255.0 ); gl_FragData[2] = vec4( specular, shininess / 255.0, emission, 1.0 ); } From 303f11af1dd9dbcb37b9b35a4c3696937a0f31a1 Mon Sep 17 00:00:00 2001 From: Gijs de Rooy Date: Wed, 4 Apr 2012 18:22:56 +0200 Subject: [PATCH 2/3] Remove unused property from skydome effect. --- Effects/skydome.eff | 1 - 1 file changed, 1 deletion(-) diff --git a/Effects/skydome.eff b/Effects/skydome.eff index 09fd3ede9..a7070ff55 100644 --- a/Effects/skydome.eff +++ b/Effects/skydome.eff @@ -17,7 +17,6 @@ - /sim/rendering/shader-effects /sim/rendering/shaders/skydome From f15b01df8e2411c17b03ebcb0b5e86d1b496824f Mon Sep 17 00:00:00 2001 From: Gijs de Rooy Date: Wed, 4 Apr 2012 18:40:00 +0200 Subject: [PATCH 3/3] Disable skydome shader when quality-level=0 via commandline. --- Nasal/gui.nas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Nasal/gui.nas b/Nasal/gui.nas index 1eea0ec95..e6b955bea 100644 --- a/Nasal/gui.nas +++ b/Nasal/gui.nas @@ -1357,6 +1357,9 @@ if (qualityLevel == -1) { elsif (qualityLevel != nil) { setprop("/sim/rendering/shaders/custom-settings",0); setprop("/sim/rendering/shaders/quality-level-internal",qualityLevel); + if (qualityLevel == 0) { + setprop("/sim/rendering/shaders/skydome",0); + } } # overwrite custom shader settings when quality-level is set through the slider # in the Rendering Options dialog