summaryrefslogtreecommitdiff
path: root/indra/newview/llviewershadermgr.cpp
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2022-03-18 19:42:58 -0700
committerPtolemy <ptolemy@lindenlab.com>2022-03-18 19:54:27 -0700
commitbcd37186f18ebf5f9418fb0a54ef1cd5b6e0095f (patch)
tree674c058ea86e2d04881d99096a0d9c5fc5a7f2a9 /indra/newview/llviewershadermgr.cpp
parentda6635702a7d07ddd3a45090cc74aea671c9a7c0 (diff)
SL-16993: Fix Model Upload Physics Analyze rendering physics hull as black mesh
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r--indra/newview/llviewershadermgr.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index c97b1d914b..a8e0f576ca 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -102,6 +102,7 @@ LLGLSLShader gSkinnedObjectSimpleProgram;
LLGLSLShader gObjectSimpleImpostorProgram;
LLGLSLShader gSkinnedObjectSimpleImpostorProgram;
LLGLSLShader gObjectPreviewProgram;
+LLGLSLShader gPhysicsPreviewProgram;
LLGLSLShader gObjectSimpleWaterProgram;
LLGLSLShader gSkinnedObjectSimpleWaterProgram;
LLGLSLShader gObjectSimpleAlphaMaskProgram;
@@ -758,6 +759,7 @@ void LLViewerShaderMgr::unloadShaders()
gObjectSimpleImpostorProgram.unload();
gSkinnedObjectSimpleImpostorProgram.unload();
gObjectPreviewProgram.unload();
+ gPhysicsPreviewProgram.unload();
gImpostorProgram.unload();
gObjectSimpleAlphaMaskProgram.unload();
gSkinnedObjectSimpleAlphaMaskProgram.unload();
@@ -3023,6 +3025,24 @@ BOOL LLViewerShaderMgr::loadShadersObject()
if (success)
{
+ gPhysicsPreviewProgram.mName = "Preview Physics Shader";
+ gPhysicsPreviewProgram.mFeatures.calculatesLighting = false;
+ gPhysicsPreviewProgram.mFeatures.calculatesAtmospherics = false;
+ gPhysicsPreviewProgram.mFeatures.hasGamma = false;
+ gPhysicsPreviewProgram.mFeatures.hasAtmospherics = false;
+ gPhysicsPreviewProgram.mFeatures.hasLighting = false;
+ gPhysicsPreviewProgram.mFeatures.mIndexedTextureChannels = 0;
+ gPhysicsPreviewProgram.mFeatures.disableTextureIndex = true;
+ gPhysicsPreviewProgram.mShaderFiles.clear();
+ gPhysicsPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewPhysicsV.glsl", GL_VERTEX_SHADER_ARB));
+ gPhysicsPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewPhysicsF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gPhysicsPreviewProgram.mShaderLevel = mShaderLevel[SHADER_OBJECT];
+ success = gPhysicsPreviewProgram.createShader(NULL, NULL);
+ gPhysicsPreviewProgram.mFeatures.hasLighting = false;
+ }
+
+ if (success)
+ {
gObjectSimpleProgram.mName = "Simple Shader";
gObjectSimpleProgram.mFeatures.calculatesLighting = true;
gObjectSimpleProgram.mFeatures.calculatesAtmospherics = true;