summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-08-24 15:41:00 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-08-24 15:41:00 -0700
commitbf0d36bf889bb913fbc2a53c5a1b9818acb11ee6 (patch)
tree62e75dd7ea2791addced07fa595dd37789cc12cc /indra/llrender
parent11d7a7f197d31617602ff9c109674a783fd6fa71 (diff)
Mac rendering now with 100% fewer crashes when enabling shadows.
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llglslshader.cpp2
-rw-r--r--indra/llrender/llshadermgr.cpp3
2 files changed, 5 insertions, 0 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 02bcc9e338..61648e527d 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -117,10 +117,12 @@ BOOL LLGLSLShader::createShader(vector<string> * attributes,
// Create program
mProgramObject = glCreateProgramObjectARB();
+#if !LL_DARWIN
if (gGLManager.mGLVersion < 3.1f)
{ //force indexed texture channels to 1 if GL version is old (performance improvement for drivers with poor branching shader model support)
mFeatures.mIndexedTextureChannels = llmin(mFeatures.mIndexedTextureChannels, 1);
}
+#endif // !LL_DARWIN
//compile new source
vector< pair<string,GLenum> >::iterator fileIter = mShaderFiles.begin();
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index b487cda4ef..db3d7becd9 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -544,10 +544,13 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
{
//set version to 1.20
text[count++] = strdup("#version 120\n");
+ text[count++] = strdup("#define FXAA_GLSL_120 1\n");
+ text[count++] = strdup("#define FXAA_FAST_PIXEL_OFFSET 0\n");
}
else
{ //set version to 1.30
text[count++] = strdup("#version 130\n");
+ text[count++] = strdup("#define FXAA_GLSL_130 1\n");
}
//copy preprocessor definitions into buffer