diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-06-27 18:49:36 -0500 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-06-27 18:49:36 -0500 |
commit | 8d17467f7f70aa28d7ad012426ca59dc760bc43f (patch) | |
tree | 7450535fd9aadb0ad0d585be9c55ff93dc87846d /indra/newview/llviewershadermgr.cpp | |
parent | 298109864503d9c1e00d41dd1556f9dfea988e14 (diff) |
SL-19884 Fix for garbled rigged meshes in model import preview window.
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 5eae1dfb18..4559d71d6d 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -92,6 +92,7 @@ LLGLSLShader gCopyDepthProgram; //object shaders LLGLSLShader gObjectPreviewProgram; +LLGLSLShader gSkinnedObjectPreviewProgram; LLGLSLShader gPhysicsPreviewProgram; LLGLSLShader gObjectFullbrightAlphaMaskProgram; LLGLSLShader gSkinnedObjectFullbrightAlphaMaskProgram; @@ -251,7 +252,6 @@ LLViewerShaderMgr::LLViewerShaderMgr() : mShaderList.push_back(&gWaterProgram); mShaderList.push_back(&gWaterEdgeProgram); mShaderList.push_back(&gAvatarEyeballProgram); - mShaderList.push_back(&gObjectPreviewProgram); mShaderList.push_back(&gImpostorProgram); mShaderList.push_back(&gObjectBumpProgram); mShaderList.push_back(&gSkinnedObjectBumpProgram); @@ -2876,20 +2876,16 @@ BOOL LLViewerShaderMgr::loadShadersObject() if (success) { - gObjectPreviewProgram.mName = "Simple Shader"; - gObjectPreviewProgram.mFeatures.calculatesLighting = false; - gObjectPreviewProgram.mFeatures.calculatesAtmospherics = false; - gObjectPreviewProgram.mFeatures.hasGamma = false; - gObjectPreviewProgram.mFeatures.hasAtmospherics = false; - gObjectPreviewProgram.mFeatures.hasLighting = false; - gObjectPreviewProgram.mFeatures.mIndexedTextureChannels = 0; + gObjectPreviewProgram.mName = "Object Preview Shader"; gObjectPreviewProgram.mFeatures.disableTextureIndex = true; gObjectPreviewProgram.mShaderFiles.clear(); gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewV.glsl", GL_VERTEX_SHADER)); gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewF.glsl", GL_FRAGMENT_SHADER)); gObjectPreviewProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT]; + success = make_rigged_variant(gObjectPreviewProgram, gSkinnedObjectPreviewProgram); success = gObjectPreviewProgram.createShader(NULL, NULL); gObjectPreviewProgram.mFeatures.hasLighting = true; + gSkinnedObjectPreviewProgram.mFeatures.hasLighting = true; } if (success) |