summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/treeF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/treeF.glsl17
1 files changed, 7 insertions, 10 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
index 89e354558a..e2d87e68fa 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
@@ -25,17 +25,13 @@
/*[EXTRA_CODE_HERE]*/
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 frag_data[3];
-#else
-#define frag_data gl_FragData
-#endif
+out vec4 frag_data[4];
uniform sampler2D diffuseMap;
-VARYING vec4 vertex_color;
-VARYING vec3 vary_normal;
-VARYING vec2 vary_texcoord0;
+in vec4 vertex_color;
+in vec3 vary_normal;
+in vec2 vary_texcoord0;
uniform float minimum_alpha;
@@ -43,7 +39,7 @@ vec2 encode_normal(vec3 n);
void main()
{
- vec4 col = texture2D(diffuseMap, vary_texcoord0.xy);
+ vec4 col = texture(diffuseMap, vary_texcoord0.xy);
if (col.a < minimum_alpha)
{
discard;
@@ -52,5 +48,6 @@ void main()
frag_data[0] = vec4(vertex_color.rgb*col.rgb, 0.0);
frag_data[1] = vec4(0,0,0,0);
vec3 nvn = normalize(vary_normal);
- frag_data[2] = vec4(encode_normal(nvn.xyz), 0.0, 0.0);
+ frag_data[2] = vec4(encode_normal(nvn.xyz), 0.0, GBUFFER_FLAG_HAS_ATMOS);
+ frag_data[3] = vec4(0);
}