summaryrefslogtreecommitdiff
path: root/indra/llrender/llglslshader.h
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2024-05-29 16:56:39 -0500
committerGitHub <noreply@github.com>2024-05-29 16:56:39 -0500
commit15fd13f83036ff781160957a21bb2d59771044bc (patch)
tree984601482bc6d7384796123bce39b7e50074ec5a /indra/llrender/llglslshader.h
parent2d0fe5ca7bf3bda62bf10a37a65f5859e6d1b095 (diff)
#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
Diffstat (limited to 'indra/llrender/llglslshader.h')
-rw-r--r--indra/llrender/llglslshader.h28
1 files changed, 20 insertions, 8 deletions
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<LLGLSLShader*> 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<LLGLSLShader> mGLTFVariants;
//helper to bind GLTF variant
- void bind(GLTFVariant variant);
+ void bind(U32 variant);
// hacky flag used for optimization in LLDrawPoolAlpha
bool mCanBindFast = false;