diff options
author | Michael Pohoreski <ptolemy@lindenlab.com> | 2022-03-25 15:54:49 +0000 |
---|---|---|
committer | Michael Pohoreski <ptolemy@lindenlab.com> | 2022-03-25 15:54:49 +0000 |
commit | c6da3dfd2f57cba4562f6732b5f1d523cf4f7e11 (patch) | |
tree | 87d24e45b4982b82ddecf578d96f0b54451dcf03 /indra/newview/llmodelpreview.cpp | |
parent | 96178e689b3df429e2768566afe817b0f7e7cc1d (diff) | |
parent | 506bada6ebe6e2ae711e6ec8e6e85338bfbcc95f (diff) |
Merged in SL-16993 (pull request #910)
SL-16993
Approved-by: Euclid Linden
Diffstat (limited to 'indra/newview/llmodelpreview.cpp')
-rw-r--r-- | indra/newview/llmodelpreview.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index b60fabb01b..c7f56de4ed 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -3285,6 +3285,14 @@ BOOL LLModelPreview::render() if (!physics.mMesh.empty()) { //render hull instead of mesh + // SL-16993 physics.mMesh[i].mNormals were being used to light the exploded + // analyzed physics shape but the drawArrays() interface changed + // causing normal data <0,0,0> to be passed to the shader. + // The Phyics Preview shader uses plain vertex coloring so the physics hull is full lit. + // We could also use interface/ui shaders. + gObjectPreviewProgram.unbind(); + gPhysicsPreviewProgram.bind(); + for (U32 i = 0; i < physics.mMesh.size(); ++i) { if (explode > 0.f) @@ -3312,6 +3320,9 @@ BOOL LLModelPreview::render() gGL.popMatrix(); } } + + gPhysicsPreviewProgram.unbind(); + gObjectPreviewProgram.bind(); } } } |