diff options
author | Dave Parks <davep@lindenlab.com> | 2024-06-10 10:43:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-10 10:43:38 -0500 |
commit | 227e9be06832515fd10eb496d4a2a4528d1ebd92 (patch) | |
tree | dfe366ee3ea6c4fe4b08dc080fd07313e279a7d5 /indra/llrender/llglslshader.h | |
parent | 33ddedd6b557ed9130dd8cd3b8327a697614a3ac (diff) |
#1654 generate normals and tangents according to gltf specification (#1662)
* Disable unloading of objects in background.
* Add unlit GLTF shader variant
Diffstat (limited to 'indra/llrender/llglslshader.h')
-rw-r--r-- | indra/llrender/llglslshader.h | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h index 8ebea2deca..f2b5c4881c 100644 --- a/indra/llrender/llglslshader.h +++ b/indra/llrender/llglslshader.h @@ -184,17 +184,14 @@ public: // If force_read is true, will force an immediate readback (severe performance penalty) bool readProfileQuery(bool for_runtime = false, bool force_read = false); - bool createShader(std::vector<LLStaticHashedString>* attributes, - std::vector<LLStaticHashedString>* uniforms, - U32 varying_count = 0, - const char** varyings = NULL); + bool createShader(); bool attachFragmentObject(std::string object); bool attachVertexObject(std::string object); void attachObject(GLuint object); void attachObjects(GLuint* objects = NULL, S32 count = 0); - bool mapAttributes(const std::vector<LLStaticHashedString>* attributes); - bool mapUniforms(const std::vector<LLStaticHashedString>*); - void mapUniform(GLint index, const std::vector<LLStaticHashedString>*); + bool mapAttributes(); + bool mapUniforms(); + void mapUniform(GLint index); void uniform1i(U32 index, GLint i); void uniform1f(U32 index, GLfloat v); void fastUniform1f(U32 index, GLfloat v); @@ -330,22 +327,20 @@ public: // variants for use by GLTF renderer // bit 0 = alpha mode blend (1) or opaque (0) // bit 1 = rigged (1) or static (0) + // bit 2 = unlit (1) or lit (0) struct GLTFVariant { - 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 U8 ALPHA_BLEND = 1; + constexpr static U8 RIGGED = 2; + constexpr static U8 UNLIT = 4; }; - constexpr static U32 NUM_GLTF_VARIANTS = 4; + constexpr static U8 NUM_GLTF_VARIANTS = 8; std::vector<LLGLSLShader> mGLTFVariants; //helper to bind GLTF variant - void bind(U32 variant); + void bind(U8 variant); // hacky flag used for optimization in LLDrawPoolAlpha bool mCanBindFast = false; |