diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2022-10-31 09:42:27 -0700 |
---|---|---|
committer | Cosmic Linden <cosmic@lindenlab.com> | 2022-11-02 12:55:18 -0700 |
commit | 9e7b725c15ea0bfea5246eb81dd7a100b7ac5b6b (patch) | |
tree | bbc065c955992f45933c0f9d83d61761121d589f /indra/llrender/llvertexbuffer.h | |
parent | d042ad67ed4db72bf0265804e26610e565f15cf2 (diff) |
SL-18485: Render GLTF materials with extension KHR_texture_transform with approprate texture transforms
Diffstat (limited to 'indra/llrender/llvertexbuffer.h')
-rw-r--r-- | indra/llrender/llvertexbuffer.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h index 233d7785f8..b54e99ca27 100644 --- a/indra/llrender/llvertexbuffer.h +++ b/indra/llrender/llvertexbuffer.h @@ -160,11 +160,12 @@ public: //WARNING -- when updating these enums you MUST // 1 - update LLVertexBuffer::sTypeSize - // 2 - add a strider accessor - // 3 - modify LLVertexBuffer::setupVertexBuffer - // 4 - modify LLVertexBuffer::setupClientArray - // 5 - modify LLViewerShaderMgr::mReservedAttribs - // 6 - update LLVertexBuffer::setupVertexArray + // 2 - update LLVertexBuffer::vb_type_name + // 3 - add a strider accessor + // 4 - modify LLVertexBuffer::setupVertexBuffer + // 5 - modify LLVertexBuffer::setupVertexBufferFast + // 6 - modify LLViewerShaderMgr::mReservedAttribs + // 7 - update LLVertexBuffer::setupVertexArray // clang-format off enum { // Shader attribute name, set in LLShaderMgr::initAttribsAndUniforms() @@ -181,6 +182,10 @@ public: TYPE_WEIGHT4, // "weight4" TYPE_CLOTHWEIGHT, // "clothing" TYPE_TEXTURE_INDEX, // "texture_index" + TYPE_BASECOLOR_TEXCOORD, // "basecolor_texcoord" (GLTF) + TYPE_NORMAL_TEXCOORD, // "normal_texcoord" (GLTF) + TYPE_METALLIC_ROUGHNESS_TEXCOORD, // "metallic_roughness_texcoord" (GLTF) + TYPE_EMISSIVE_TEXCOORD, // "emissive_texcoord" (GLTF) TYPE_MAX, // TYPE_MAX is the size/boundary marker for attributes that go in the vertex buffer TYPE_INDEX, // TYPE_INDEX is beyond _MAX because it lives in a separate (index) buffer }; @@ -195,12 +200,15 @@ public: MAP_TEXCOORD3 = (1<<TYPE_TEXCOORD3), MAP_COLOR = (1<<TYPE_COLOR), MAP_EMISSIVE = (1<<TYPE_EMISSIVE), - // These use VertexAttribPointer and should possibly be made generic MAP_TANGENT = (1<<TYPE_TANGENT), MAP_WEIGHT = (1<<TYPE_WEIGHT), MAP_WEIGHT4 = (1<<TYPE_WEIGHT4), MAP_CLOTHWEIGHT = (1<<TYPE_CLOTHWEIGHT), MAP_TEXTURE_INDEX = (1<<TYPE_TEXTURE_INDEX), + MAP_BASECOLOR_TEXCOORD = (1<<TYPE_BASECOLOR_TEXCOORD), + MAP_NORMAL_TEXCOORD = (1<<TYPE_NORMAL_TEXCOORD), + MAP_METALLIC_ROUGHNESS_TEXCOORD = (1<<TYPE_METALLIC_ROUGHNESS_TEXCOORD), + MAP_EMISSIVE_TEXCOORD = (1<<TYPE_EMISSIVE_TEXCOORD), }; protected: @@ -269,6 +277,10 @@ public: bool getWeightStrider(LLStrider<F32>& strider, S32 index=0, S32 count = -1, bool map_range = false); bool getWeight4Strider(LLStrider<LLVector4>& strider, S32 index=0, S32 count = -1, bool map_range = false); bool getClothWeightStrider(LLStrider<LLVector4>& strider, S32 index=0, S32 count = -1, bool map_range = false); + bool getBasecolorTexcoordStrider(LLStrider<LLVector2>& strider, S32 index=0, S32 count = -1, bool map_range = false); + bool getNormalTexcoordStrider(LLStrider<LLVector2>& strider, S32 index=0, S32 count = -1, bool map_range = false); + bool getMetallicRoughnessTexcoordStrider(LLStrider<LLVector2>& strider, S32 index=0, S32 count = -1, bool map_range = false); + bool getEmissiveTexcoordStrider(LLStrider<LLVector2>& strider, S32 index=0, S32 count = -1, bool map_range = false); bool useVBOs() const; |