summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl7
-rw-r--r--indra/newview/llviewershadermgr.cpp3
4 files changed, 14 insertions, 7 deletions
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;
+
}
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index e5fed25798..7a9264fa84 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -1430,7 +1430,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredSkinnedAlphaProgram.addPermutation("USE_INDEXED_TEX", "1");
gDeferredSkinnedAlphaProgram.addPermutation("USE_VERTEX_COLOR", "1");
- gDeferredSkinnedAlphaProgram.addPermutation("HAS_SKIN","1");
gDeferredAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredAlphaProgram.createShader(NULL, NULL);
@@ -1608,7 +1607,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredAvatarAlphaProgram.addPermutation("USE_DIFFUSE_TEX", "1");
- gDeferredAvatarAlphaProgram.addPermutation("USE_VERTEX_COLOR", "1");
gDeferredAvatarAlphaProgram.addPermutation("IS_AVATAR_SKIN", "1");
gDeferredAvatarAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
@@ -3047,3 +3045,4 @@ LLViewerShaderMgr::shader_iter LLViewerShaderMgr::endShaders() const
{
return mShaderList.end();
}
+