diff options
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 4e38d2f7e9..286152867f 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -208,7 +208,7 @@ LLGLSLShader gDeferredStarProgram; LLGLSLShader gNormalMapGenProgram; // Deferred materials shaders -LLGLSLShader gDeferredMaterialProgram[LLMaterial::SHADER_COUNT]; +LLGLSLShader gDeferredMaterialProgram[LLMaterial::SHADER_COUNT*2]; LLViewerShaderMgr::LLViewerShaderMgr() : mVertexShaderLevel(SHADER_COUNT, 0), @@ -1108,7 +1108,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredWLCloudProgram.unload(); gDeferredStarProgram.unload(); gNormalMapGenProgram.unload(); - for (U32 i = 0; i < LLMaterial::SHADER_COUNT; ++i) + for (U32 i = 0; i < LLMaterial::SHADER_COUNT*2; ++i) { gDeferredMaterialProgram[i].unload(); } @@ -1227,7 +1227,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() } - for (U32 i = 0; i < LLMaterial::SHADER_COUNT; ++i) + for (U32 i = 0; i < LLMaterial::SHADER_COUNT*2; ++i) { if (success) { @@ -1243,6 +1243,13 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredMaterialProgram[i].addPermutation("HAS_SPECULAR_MAP", i & 0x4 ? "1" : "0"); gDeferredMaterialProgram[i].addPermutation("DIFFUSE_ALPHA_MODE", llformat("%d", alpha_mode)); + bool has_skin = i & 0x10; + gDeferredMaterialProgram[i].addPermutation("HAS_SKIN",has_skin ? "1" : "0"); + if (has_skin) + { + gDeferredMaterialProgram[i].mFeatures.hasObjectSkinning = true; + } + success = gDeferredMaterialProgram[i].createShader(NULL, NULL); } } |