diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index c37316b10aaa3dd4e9a59c83dc4946fe9c7697b2..14957a72442a7e87917576848d49e1ba8db4972b 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -767,8 +767,10 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev //backwards compatibility with legacy texture lookup syntax extra_code_text[extra_code_count++] = strdup("#define texture2D texture\n"); + extra_code_text[extra_code_count++] = strdup("#define texture3D texture\n"); extra_code_text[extra_code_count++] = strdup("#define textureCube texture\n"); extra_code_text[extra_code_count++] = strdup("#define texture2DLod textureLod\n"); + extra_code_text[extra_code_count++] = strdup("#define texture3DLod textureLod\n"); extra_code_text[extra_code_count++] = strdup("#define texture2DLodOffset textureLodOffset\n"); extra_code_text[extra_code_count++] = strdup("#define shadow2D(a,b) vec2(texture(a,b))\n"); diff --git a/indra/newview/app_settings/shaders/class1/alchemy/toneMapF.glsl b/indra/newview/app_settings/shaders/class1/alchemy/toneMapF.glsl index a5ee7a1d6a6acf1cd23264eb3bde08aa45c92c71..baf48916b089251c631c46ac444669dde90052c4 100644 --- a/indra/newview/app_settings/shaders/class1/alchemy/toneMapF.glsl +++ b/indra/newview/app_settings/shaders/class1/alchemy/toneMapF.glsl @@ -22,6 +22,8 @@ * $/LicenseInfo$ */ + #extension GL_ARB_shader_texture_lod : enable + /*[EXTRA_CODE_HERE]*/ #ifdef DEFINE_GL_FRAGCOLOR @@ -231,7 +233,7 @@ void main() //see https://developer.nvidia.com/gpugems/GPUGems2/gpugems2_chapter24.html vec3 scale = (vec3(colorgrade_lut_size.x) - 1.0) / vec3(colorgrade_lut_size.x); vec3 offset = 1.0 / (2.0 * vec3(colorgrade_lut_size.x)); - diff = vec4(linear_to_srgb(texture2DLod(colorgrade_lut, scale * diff.rgb + offset, 0).rgb), diff.a); + diff = vec4(linear_to_srgb(texture3DLod(colorgrade_lut, scale * diff.rgb + offset, 0).rgb), diff.a); #endif frag_color = diff;