diff options
author | Dave Parks <davep@lindenlab.com> | 2022-03-25 13:21:10 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-03-25 13:21:10 -0500 |
commit | 180989f28e69600a3bc198b8b62101ec25374bee (patch) | |
tree | a6e0496f1eba79e5edc4912b2959a1ef86a3aec9 /indra/newview/llmodelpreview.cpp | |
parent | 34e79c8f4e251200496651f9ae2b5126a6f7faa3 (diff) | |
parent | ed98d77fe81a04a03c76e159f8fa963adf6b1109 (diff) |
Merge remote-tracking branch 'remotes/origin/DRTVWR-546' into SL-17005
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(); } } } |