From 4f26fe6430cd12914b0d6edf33baabe19829d014 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 12 Oct 2024 16:39:32 +0800 Subject: Preprocess eTextureType like sGLTextureType (cause eTextureType seems to have been designed to mirror sGLTextureType) otherwise you'd get a GL error of invalid enum of the first argument for glTexImage2D. --- indra/newview/pipeline.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index fae55055c5..b3b1d272d0 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -8787,8 +8787,13 @@ void LLPipeline::bindReflectionProbes(LLGLSLShader& shader) return; } +#if GL_VERSION_4_0 S32 channel = shader.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY); +#else + S32 channel; +#endif bool bound = false; +#if GL_VERSION_4_0 if (channel > -1 && mReflectionMapManager.mTexture.notNull()) { mReflectionMapManager.mTexture->bind(channel); @@ -8819,6 +8824,7 @@ void LLPipeline::bindReflectionProbes(LLGLSLShader& shader) setEnvMat(shader); } +#endif // reflection probe shaders generally sample the scene map as well for SSR channel = shader.enableTexture(LLShaderMgr::SCENE_MAP); -- cgit v1.2.3