summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl1
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowV.glsl20
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl3
5 files changed, 16 insertions, 14 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
index 4ac1ff9368..7b4b62f0eb 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
@@ -34,7 +34,6 @@ out vec4 frag_color;
#endif
uniform sampler2D diffuseRect;
-uniform sampler2D emissiveRect;
uniform sampler2D exposureMap;
uniform vec2 screen_res;
@@ -184,7 +183,7 @@ vec3 legacyGamma(vec3 color)
void main()
{
//this is the one of the rare spots where diffuseRect contains linear color values (not sRGB)
- vec4 diff = texture2D(diffuseRect, vary_fragcoord) + texture2D(emissiveRect, vary_fragcoord);
+ vec4 diff = texture2D(diffuseRect, vary_fragcoord);
diff.rgb = toneMap(diff.rgb);
diff.rgb = legacyGamma(diff.rgb);
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl
index db0662ad89..fdca5018b0 100644
--- a/indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl
+++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl
@@ -26,7 +26,6 @@
uniform mat4 modelview_projection_matrix;
ATTRIBUTE vec3 position;
-ATTRIBUTE vec2 texcoord0;
VARYING vec2 vary_texcoord0;
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowV.glsl b/indra/newview/app_settings/shaders/class1/effects/glowV.glsl
index ea66e8271b..63ca15139c 100644
--- a/indra/newview/app_settings/shaders/class1/effects/glowV.glsl
+++ b/indra/newview/app_settings/shaders/class1/effects/glowV.glsl
@@ -26,7 +26,6 @@
uniform mat4 modelview_projection_matrix;
ATTRIBUTE vec3 position;
-ATTRIBUTE vec2 texcoord0;
uniform vec2 glowDelta;
@@ -39,12 +38,15 @@ void main()
{
gl_Position = vec4(position, 1.0);
- vary_texcoord0.xy = texcoord0 + glowDelta*(-3.5);
- vary_texcoord1.xy = texcoord0 + glowDelta*(-2.5);
- vary_texcoord2.xy = texcoord0 + glowDelta*(-1.5);
- vary_texcoord3.xy = texcoord0 + glowDelta*(-0.5);
- vary_texcoord0.zw = texcoord0 + glowDelta*(0.5);
- vary_texcoord1.zw = texcoord0 + glowDelta*(1.5);
- vary_texcoord2.zw = texcoord0 + glowDelta*(2.5);
- vary_texcoord3.zw = texcoord0 + glowDelta*(3.5);
+ vec2 texcoord = position.xy * 0.5 + 0.5;
+
+
+ vary_texcoord0.xy = texcoord + glowDelta*(-3.5);
+ vary_texcoord1.xy = texcoord + glowDelta*(-2.5);
+ vary_texcoord2.xy = texcoord + glowDelta*(-1.5);
+ vary_texcoord3.xy = texcoord + glowDelta*(-0.5);
+ vary_texcoord0.zw = texcoord + glowDelta*(0.5);
+ vary_texcoord1.zw = texcoord + glowDelta*(1.5);
+ vary_texcoord2.zw = texcoord + glowDelta*(2.5);
+ vary_texcoord3.zw = texcoord + glowDelta*(3.5);
}
diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl
index 770c436ede..3b25a5df16 100644
--- a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl
@@ -31,12 +31,13 @@ out vec4 frag_color;
uniform sampler2D diffuseRect;
uniform sampler2D depthMap;
+uniform sampler2D emissiveRect;
in vec2 tc;
void main()
{
- frag_color = texture2D(diffuseRect, tc);
+ frag_color = texture2D(diffuseRect, tc) + texture2D(emissiveRect, tc);
gl_FragDepth = texture(depthMap, tc).r;
}
diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl
index c50548d528..6cc83138a2 100644
--- a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl
@@ -30,6 +30,7 @@
out vec4 frag_color;
uniform sampler2D diffuseRect;
+uniform sampler2D emissiveRect;
uniform vec2 screen_res;
@@ -37,7 +38,7 @@ in vec2 vary_tc;
void main()
{
- vec3 col = texture(diffuseRect, vary_tc).rgb;
+ vec3 col = texture(diffuseRect, vary_tc).rgb + texture(emissiveRect, vary_tc).rgb;
frag_color = vec4(col.rgb, dot(col.rgb, vec3(0.299, 0.587, 0.144)));
}