From 15fd13f83036ff781160957a21bb2d59771044bc Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 29 May 2024 16:56:39 -0500 Subject: #1530 Increase joint limit for GLTF Assets (#1582) * Migrate GLTF scene rendering to its own shaders * Add support for ambient occlusion map separate from metallic roughness map (or absent) * Use UBO's for GLTF joints * Better error handling of downloading GLTF assets --- indra/llrender/llglslshader.h | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'indra/llrender/llglslshader.h') diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h index fa01d212e1..8ebea2deca 100644 --- a/indra/llrender/llglslshader.h +++ b/indra/llrender/llglslshader.h @@ -146,6 +146,14 @@ public: SG_COUNT } eGroup; + enum UniformBlock : GLuint + { + UB_REFLECTION_PROBES, + UB_GLTF_JOINTS, + NUM_UNIFORM_BLOCKS + }; + + static std::set sInstances; static bool sProfileEnabled; @@ -320,20 +328,24 @@ public: LLGLSLShader* mRiggedVariant = nullptr; // variants for use by GLTF renderer - // "this" is considered to be OPAQUE - enum GLTFVariant + // bit 0 = alpha mode blend (1) or opaque (0) + // bit 1 = rigged (1) or static (0) + struct GLTFVariant { - STATIC_OPAQUE, - STATIC_BLEND, - RIGGED_OPAQUE, - RIGGED_BLEND, - NUM_GLTF_VARIANTS + constexpr static U32 RIGGED = 2; + constexpr static U32 ALPHA = 1; + constexpr static U32 OPAQUE_STATIC = 0; + constexpr static U32 ALPHA_STATIC = 1; + constexpr static U32 OPAQUE_RIGGED = 2; + constexpr static U32 ALPHA_RIGGED = 3; }; + constexpr static U32 NUM_GLTF_VARIANTS = 4; + std::vector mGLTFVariants; //helper to bind GLTF variant - void bind(GLTFVariant variant); + void bind(U32 variant); // hacky flag used for optimization in LLDrawPoolAlpha bool mCanBindFast = false; -- cgit v1.2.3