diff options
author | Howard Stearns <howard.stearns@gmail.com> | 2022-08-25 14:51:51 -0700 |
---|---|---|
committer | Howard Stearns <howard.stearns@gmail.com> | 2022-08-25 14:51:51 -0700 |
commit | e81ed6242f13c3ce1f88432482b6c2d182b436ea (patch) | |
tree | 401fe0f7a4e2c77ee884f4675589d1b55c5eedc5 /indra/newview | |
parent | 23126b78255adcb02bafe39891d31da70a0884e8 (diff) |
SL-17967 compiles and runs by avoiding the features
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl | 18 | ||||
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 4 |
2 files changed, 17 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl index 777021cd53..c4d1e7d1a7 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl @@ -158,7 +158,11 @@ float getDepth(vec2 pos_screen) vec4 getTexture2DLodAmbient(vec2 tc, float lod) { - vec4 ret = texture2DLod(projectionMap, tc, lod); +#ifndef FXAA_GLSL_120 + vec4 ret = textureLod(projectionMap, tc, lod); +#else + vec4 ret = texture2D(projectionMap, tc); +#endif ret.rgb = srgb_to_linear(ret.rgb); vec2 dist = tc-vec2(0.5); @@ -170,7 +174,11 @@ vec4 getTexture2DLodAmbient(vec2 tc, float lod) vec4 getTexture2DLodDiffuse(vec2 tc, float lod) { - vec4 ret = texture2DLod(projectionMap, tc, lod); +#ifndef FXAA_GLSL_120 + vec4 ret = textureLod(projectionMap, tc, lod); +#else + vec4 ret = texture2D(projectionMap, tc); +#endif ret.rgb = srgb_to_linear(ret.rgb); vec2 dist = vec2(0.5) - abs(tc-vec2(0.5)); @@ -213,7 +221,11 @@ vec3 getProjectedLightDiffuseColor(float light_distance, vec2 projected_uv) vec4 texture2DLodSpecular(vec2 tc, float lod) { - vec4 ret = texture2DLod(projectionMap, tc, lod); +#ifndef FXAA_GLSL_120 + vec4 ret = textureLod(projectionMap, tc, lod); +#else + vec4 ret = texture2D(projectionMap, tc); +#endif ret.rgb = srgb_to_linear(ret.rgb); vec2 dist = vec2(0.5) - abs(tc-vec2(0.5)); diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 0d9670d9ca..1c6e659aed 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -3789,7 +3789,7 @@ BOOL LLViewerShaderMgr::loadShadersInterface() } } - if (success) + if (success && gGLManager.mHasCubeMapArray) { gRadianceGenProgram.mName = "Radiance Gen Shader"; gRadianceGenProgram.mShaderFiles.clear(); @@ -3799,7 +3799,7 @@ BOOL LLViewerShaderMgr::loadShadersInterface() success = gRadianceGenProgram.createShader(NULL, NULL); } - if (success) + if (success && gGLManager.mHasCubeMapArray) { gIrradianceGenProgram.mName = "Irradiance Gen Shader"; gIrradianceGenProgram.mShaderFiles.clear(); |