From 38b222e76bc5fc4dd3f05787a45f38087b4af5cc Mon Sep 17 00:00:00 2001 From: "Graham Madarasz (Graham)" Date: Mon, 22 Apr 2013 09:56:08 -0700 Subject: Fix regression in alpha shader on non-Mac from recent changes --- indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl | 6 ++++-- indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1') diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index a3be4bb0c3..ec04f856fb 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -106,11 +106,13 @@ void main() #ifdef USE_INDEXED_TEX vec4 diff = diffuseLookup(vary_texcoord0.xy); -#else +#endif + +#ifdef USE_DIFFUSE_TEX vec4 diff = texture2D(diffuseMap,vary_texcoord0.xy); #endif - diff.rgb = pow(diff.rgb, vec3(2.2)); + diff.rgb = pow(diff.rgb, vec3(2.2f, 2.2f, 2.2f)); #ifdef USE_VERTEX_COLOR float vertex_color_alpha = vertex_color.a; diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl index 93f9e05aec..91f7b007f3 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl @@ -49,9 +49,11 @@ ATTRIBUTE vec2 texcoord0; #ifdef HAS_SKIN mat4 getObjectSkinnedTransform(); -#elif IS_AVATAR_SKIN +#else +ifdef IS_AVATAR_SKIN mat4 getSkinnedTransform(); #endif +#endif vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol); void calcAtmospherics(vec3 inPositionEye); @@ -211,3 +213,4 @@ void main() #endif } + -- cgit v1.2.3