diff options
Diffstat (limited to 'indra')
6 files changed, 11 insertions, 17 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 9a4eeb59df..471d73febf 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -401,11 +401,6 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes, // work-around missing mix(vec3,vec3,bvec3) mDefines["OLD_SELECT"] = "1"; #endif - - if (mExtraLinkObject) - { - attachObject(mExtraLinkObject); - } //compile new source vector< pair<string,GLenum> >::iterator fileIter = mShaderFiles.begin(); diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h index e5110fe1c4..830bad2aef 100644 --- a/indra/llrender/llglslshader.h +++ b/indra/llrender/llglslshader.h @@ -218,8 +218,6 @@ public: std::vector<U32> mTextureMagFilter; std::vector<U32> mTextureMinFilter; - GLhandleARB mExtraLinkObject = 0; - private: void unloadInternal(); }; diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index dd691fb36b..5f4f1677d7 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -301,7 +301,8 @@ void main() ambient *= ambient; ambient = 1.0 - ambient * smoothstep(0.0, 0.3, shadow); - vec3 sun_contrib = min(da, shadow) * sunlit; + float final_da = min(da, shadow); + vec3 sun_contrib = final_da * sunlit; col.rgb *= ambient; col.rgb += sun_contrib; @@ -314,7 +315,7 @@ void main() // the old infinite-sky shiny reflection // - float sa = dot(refnormpersp, sun_dir.xyz); + float sa = dot(refnormpersp, light_dir.xyz); vec3 dumbshiny = sunlit*shadow*(texture2D(lightFunc, vec2(sa, spec.a)).r); @@ -351,8 +352,6 @@ vec3 post_spec = col.rgb; col = atmosFragLighting(col, additive, atten); col = scaleSoftClipFrag(col); -vec3 post_atmo= col.rgb; - vec3 npos = normalize(-pos.xyz); vec3 light = vec3(0,0,0); @@ -369,8 +368,6 @@ vec3 post_atmo= col.rgb; col.rgb += light.rgb; -vec3 post_lighting = col.rgb; - glare = min(glare, 1.0); float al = max(diffcol.a,glare)*vertex_color.a; diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl index c927c4bf06..6ff49c7dac 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl @@ -161,7 +161,7 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen) float sampleSpotShadow(vec3 pos, vec3 norm, int index, vec2 pos_screen) { - float shadow = 1.0f; + float shadow = 0.0f; pos += norm * spot_shadow_offset; vec4 spos = vec4(pos,1.0); @@ -194,6 +194,10 @@ float sampleSpotShadow(vec3 pos, vec3 norm, int index, vec2 pos_screen) shadow /= weight; } + else + { + shadow = 1.0f; + } return shadow; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl index 07a24698a9..a39a73f1b6 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl @@ -125,7 +125,7 @@ void main() if (spec.a > 0.0) // specular reflection { // the old infinite-sky shiny reflection - float sa = dot(refnormpersp, sun_dir.xyz); + float sa = dot(refnormpersp, light_dir.xyz); vec3 dumbshiny = sunlit*(texture2D(lightFunc, vec2(sa, spec.a)).r); // add the two types of shiny together diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl index d220bda332..484c0cae3e 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl @@ -137,8 +137,8 @@ void main() if (spec.a > 0.0) // specular reflection { // the old infinite-sky shiny reflection - float sa = dot(refnormpersp, sun_dir.xyz); - vec3 dumbshiny = sunlit*scol_ambocc.r*(texture2D(lightFunc, vec2(sa, spec.a)).r); + float sa = dot(refnormpersp, light_dir.xyz); + vec3 dumbshiny = sunlit*scol*(texture2D(lightFunc, vec2(sa, spec.a)).r); // add the two types of shiny together vec3 spec_contrib = dumbshiny * spec.rgb; |