diff options
author | Dave Parks <davep@lindenlab.com> | 2013-03-29 20:12:27 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-03-29 20:12:27 -0500 |
commit | 14f02e48b877569539c96ef5f261ac8b3943579f (patch) | |
tree | 382802d341977dc87f452804ba53062dc4f76c01 /indra/newview/llviewershadermgr.cpp | |
parent | fc4869fb7871632b95dd293157b9965fb2edcb73 (diff) |
NORSPEC-66 Hook up material parameters to rigged attachments.
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); } } |