summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl18
1 files changed, 8 insertions, 10 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
index a58cc3d12d..aae595f619 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
@@ -25,11 +25,7 @@
/*[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 float minimum_alpha;
@@ -38,23 +34,25 @@ uniform sampler2D diffuseMap;
uniform sampler2D normalMap;
uniform sampler2D specularMap;
-VARYING vec2 vary_texcoord0;
+in vec2 vary_texcoord0;
vec3 linear_to_srgb(vec3 c);
+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;
}
- vec4 norm = texture2D(normalMap, vary_texcoord0.xy);
- vec4 spec = texture2D(specularMap, vary_texcoord0.xy);
+ vec4 norm = texture(normalMap, vary_texcoord0.xy);
+ vec4 spec = texture(specularMap, vary_texcoord0.xy);
frag_data[0] = vec4(col.rgb, 0.0);
frag_data[1] = spec;
- frag_data[2] = norm;
+ frag_data[2] = vec4(encode_normal(norm.xyz),0,GBUFFER_FLAG_HAS_ATMOS);
+ frag_data[3] = vec4(0);
}