diff options
| author | Dave Parks <davep@lindenlab.com> | 2023-02-01 17:09:34 -0600 | 
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2023-02-01 17:09:34 -0600 | 
| commit | 6f136d403b6bbccae80661c6585f29e1caed3a7c (patch) | |
| tree | 9ca9853598555139f980fc915ec8646abfd58f21 /indra/newview/app_settings/shaders/class1/interface | |
| parent | c136c5ece4a6baf3b0a34c32211e00a3d0fc4b69 (diff) | |
SL-19000 Fix various 3D UI components not respecting depth buffer.  Incidental decruft.  Do I get a prize for 1000th jira?
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/interface')
3 files changed, 17 insertions, 26 deletions
| diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl index 0b4680767a..3ead2149f5 100644 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl @@ -27,20 +27,18 @@  /*[EXTRA_CODE_HERE]*/ -#ifdef DEFINE_GL_FRAGCOLOR  out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif -uniform sampler2D glowMap; -uniform sampler2D screenMap; +uniform sampler2D emissiveRect; +uniform sampler2D diffuseRect; +uniform sampler2D depthMap; -VARYING vec2 vary_texcoord0; -VARYING vec2 vary_texcoord1; +in vec2 tc;  void main()   { -	frag_color = texture2D(glowMap, vary_texcoord0.xy) + -					texture2D(screenMap, vary_texcoord1.xy); +	frag_color = texture2D(emissiveRect, tc) + +					texture2D(diffuseRect, 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 6a4c2ca623..c50548d528 100644 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl @@ -27,20 +27,17 @@  /*[EXTRA_CODE_HERE]*/ -#ifdef DEFINE_GL_FRAGCOLOR  out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif  uniform sampler2D diffuseRect;  uniform vec2 screen_res; -VARYING vec2 vary_tc; + +in vec2 vary_tc;  void main()   { -	vec3 col = texture2D(diffuseRect, vary_tc).rgb; -	 -	frag_color = vec4(col.rgb, dot(col.rgb, vec3(0.299, 0.587, 0.144))); +    vec3 col = texture(diffuseRect, vary_tc).rgb; +    +    frag_color = vec4(col.rgb, dot(col.rgb, vec3(0.299, 0.587, 0.144)));  } diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl index 71fa095505..8fa08a18c3 100644 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl @@ -25,17 +25,13 @@  uniform mat4 modelview_projection_matrix; -ATTRIBUTE vec3 position; -ATTRIBUTE vec2 texcoord0; -ATTRIBUTE vec2 texcoord1; +in vec3 position; -VARYING vec2 vary_texcoord0; -VARYING vec2 vary_texcoord1; +out vec2 tc;  void main()  { -	gl_Position = vec4(position.xyz, 1.0); -	vary_texcoord0 = position.xy * 0.5 + 0.5; -	vary_texcoord1 = vary_texcoord0; +    gl_Position = vec4(position.xyz, 1.0); +    tc = position.xy * 0.5 + 0.5;  } | 
