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 ++++- indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl | 7 +++++-- 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'indra/newview/app_settings/shaders') 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 } + diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl index a231091e12..aedb9ea510 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl @@ -224,11 +224,13 @@ void main() color.rgb = atmosLighting(color.rgb); color.rgb = scaleSoftClip(color.rgb); + col = vec4(0.0f,0.0f,0.0f,0.0f); #define LIGHT_LOOP(i) \ col.rgb += light_diffuse[i].rgb * calcPointLightOrSpotLight(pos.xyz, normal, light_position[i], light_direction[i].xyz, light_attenuation[i].x, light_attenuation[i].y, light_attenuation[i].z); - + + LIGHT_LOOP(1) LIGHT_LOOP(2) LIGHT_LOOP(3) @@ -238,7 +240,8 @@ void main() LIGHT_LOOP(7) color.rgb += diff.rgb * vary_pointlight_col * col.rgb; - + frag_color = color; + } -- cgit v1.2.3