summaryrefslogtreecommitdiff
path: root/indra/llprimitive/llgltfmaterial.cpp
diff options
context:
space:
mode:
authorcosmic-linden <111533034+cosmic-linden@users.noreply.github.com>2024-05-14 10:11:52 -0700
committerGitHub <noreply@github.com>2024-05-14 10:11:52 -0700
commit193d9d5f767c2bfad1dc5ced4fa630d05ae798ae (patch)
treecab4485b64288b3c52e26da8436c26a78c17e297 /indra/llprimitive/llgltfmaterial.cpp
parent942ff2cd8b0fe2787a9c0b85a4c61d853cd7d7dc (diff)
parent87c889b370dc08a5a6b183621346e30b729ec51c (diff)
Merge pull request #1453 from secondlife/v-907
secondlife/viewer#907: Local PBR terrain texture transform in advanced settings
Diffstat (limited to 'indra/llprimitive/llgltfmaterial.cpp')
-rw-r--r--indra/llprimitive/llgltfmaterial.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/llprimitive/llgltfmaterial.cpp b/indra/llprimitive/llgltfmaterial.cpp
index 12af568b7e..94bc5ef74c 100644
--- a/indra/llprimitive/llgltfmaterial.cpp
+++ b/indra/llprimitive/llgltfmaterial.cpp
@@ -81,7 +81,7 @@ LLGLTFMaterial::LLGLTFMaterial()
#endif
}
-void LLGLTFMaterial::TextureTransform::getPacked(F32 (&packed)[8]) const
+void LLGLTFMaterial::TextureTransform::getPacked(Pack& packed) const
{
packed[0] = mScale.mV[VX];
packed[1] = mScale.mV[VY];
@@ -92,6 +92,15 @@ void LLGLTFMaterial::TextureTransform::getPacked(F32 (&packed)[8]) const
packed[3] = packed[6] = packed[7] = 0.f;
}
+void LLGLTFMaterial::TextureTransform::getPackedTight(PackTight& packed) const
+{
+ packed[0] = mScale.mV[VX];
+ packed[1] = mScale.mV[VY];
+ packed[2] = mRotation;
+ packed[3] = mOffset.mV[VX];
+ packed[4] = mOffset.mV[VY];
+}
+
bool LLGLTFMaterial::TextureTransform::operator==(const TextureTransform& other) const
{
return mOffset == other.mOffset && mScale == other.mScale && mRotation == other.mRotation;