diff options
| author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-01-28 03:43:43 +0200 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-01-30 01:07:21 +0200 |
| commit | 98d7f697ce5d7509a4dabde877de2856e27892dd (patch) | |
| tree | 3ce17a419652d89e41985face72bd1f867f90bd2 /indra/newview/llpanelface.cpp | |
| parent | 493455a7caf8449ccc4112612a192cd0dfea29df (diff) | |
#2975 PBR support for planar aligment
Since checkbox is shared between pbr and normal textures, I'm making it affect both for now.
Diffstat (limited to 'indra/newview/llpanelface.cpp')
| -rw-r--r-- | indra/newview/llpanelface.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index bcb51b22ca..128ba42efd 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -852,6 +852,27 @@ struct LLPanelFaceSetAlignedTEFunctor : public LLSelectedTEFunctor LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatX(mPanel, uv_scale.mV[VX], te, object->getID()); LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatY(mPanel, uv_scale.mV[VY], te, object->getID()); } + + // Also align GLTF material if any + S32 gltf_info_index = 0; // base texture + LLVector2 gltf_offset, gltf_scale; + F32 gltf_rot; + if (facep->calcAlignedPlanarGLTF(mCenterFace, &gltf_offset, &gltf_scale, &gltf_rot, gltf_info_index)) + { + LLGLTFMaterial new_override; + const LLTextureEntry* tep = object->getTE(te); + if (tep && tep->getGLTFMaterialOverride()) + { + new_override = *tep->getGLTFMaterialOverride(); + } + + LLGLTFMaterial::TextureTransform& transform = new_override.mTextureTransform[gltf_info_index]; + transform.mOffset.set(gltf_offset.mV[0], gltf_offset.mV[1]); + transform.mScale.set(gltf_scale.mV[0], gltf_scale.mV[1]); + transform.mRotation = gltf_rot; + + LLGLTFMaterialList::queueModify(object, te, &new_override); + } } if (!set_aligned) { |
