diff options
author | Dave Parks <davep@lindenlab.com> | 2012-02-22 19:41:47 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-02-22 19:41:47 -0600 |
commit | bab8b9d75ad72c338e3228019825a739b41eb677 (patch) | |
tree | e14a656c88b46807eb324c60a11464f2ef9d7a4d /indra/newview/llviewershadermgr.cpp | |
parent | 8f261582b80d7d4a61cf8bb42c0429fa58f0c186 (diff) |
SH-2908 Another for crash when enabling Lighting and Shadows on some AMD GPUs
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index a598497392..10c61c01d5 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -1218,6 +1218,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() if (success) { std::string fragment; + std::string vertex = "deferred/sunLightV.glsl"; if (gSavedSettings.getBOOL("RenderDeferredSSAO")) { @@ -1226,11 +1227,15 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() else { fragment = "deferred/sunLightF.glsl"; + if (mVertexShaderLevel[SHADER_DEFERRED] == 1) + { //no shadows, no SSAO, no frag coord + vertex = "deferred/sunLightNoFragCoordV.glsl"; + } } gDeferredSunProgram.mName = "Deferred Sun Shader"; gDeferredSunProgram.mShaderFiles.clear(); - gDeferredSunProgram.mShaderFiles.push_back(make_pair("deferred/sunLightV.glsl", GL_VERTEX_SHADER_ARB)); + gDeferredSunProgram.mShaderFiles.push_back(make_pair(vertex, GL_VERTEX_SHADER_ARB)); gDeferredSunProgram.mShaderFiles.push_back(make_pair(fragment, GL_FRAGMENT_SHADER_ARB)); gDeferredSunProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED]; success = gDeferredSunProgram.createShader(NULL, NULL); |