summaryrefslogtreecommitdiff
path: root/indra/llmath/llvolume.h
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-09-08 10:06:53 -0500
committerDave Parks <davep@lindenlab.com>2022-09-08 10:06:53 -0500
commit8ad7240a3bb626ebaabcc81fb8155a8cbb5adf39 (patch)
tree6830de5176cf8562b3e50a847496d8fe97bb00f1 /indra/llmath/llvolume.h
parentabf788175c451046f82cc9aeaddc894c47863ffa (diff)
SL-18095 WIP -- Add Mikktspace tangent generation for PBR materials and switch to per-pixel binormal generation. Still bugged with some test content.
Diffstat (limited to 'indra/llmath/llvolume.h')
-rw-r--r--indra/llmath/llvolume.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index 9697952f5b..8c604c5d1a 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -870,10 +870,10 @@ private:
public:
BOOL create(LLVolume* volume, BOOL partial_build = FALSE);
- void createTangents();
+ void createTangents(bool mikktspace = false);
void resizeVertices(S32 num_verts);
- void allocateTangents(S32 num_verts);
+ void allocateTangents(S32 num_verts, bool mikktspace = false);
void allocateWeights(S32 num_verts);
void allocateJointIndices(S32 num_verts);
void resizeIndices(S32 num_indices);
@@ -947,6 +947,7 @@ public:
LLVector4a* mPositions; // Contains vertices, nortmals and texcoords
LLVector4a* mNormals; // pointer into mPositions
LLVector4a* mTangents;
+ LLVector4a* mMikktSpaceTangents = nullptr; // for GLTF rendering, use mikkt space tangents
LLVector2* mTexCoords; // pointer into mPositions
// mIndices contains mNumIndices amount of elements.
@@ -1028,7 +1029,7 @@ public:
void setDirty() { mPathp->setDirty(); mProfilep->setDirty(); }
void regen();
- void genTangents(S32 face);
+ void genTangents(S32 face, bool mikktspace = false);
BOOL isConvex() const;
BOOL isCap(S32 face);