From f6861cd5baecaf12daddde818db56edabed5ebfb Mon Sep 17 00:00:00 2001 From: Andros Baphomet Date: Sat, 5 Oct 2013 17:33:34 -0400 Subject: [PATCH] Fix shader compilation/out-of-spec issues --- indra/llrender/llshadermgr.cpp | 18 +- .../shaders/class1/deferred/alphaF.glsl | 2 +- .../class1/deferred/alphaNonIndexedF.glsl | 2 +- .../deferred/alphaNonIndexedNoColorF.glsl | 2 +- .../shaders/class1/deferred/blurLightF.glsl | 2 +- .../shaders/class1/deferred/cofF.glsl | 2 +- .../shaders/class1/deferred/dofCombineF.glsl | 2 +- .../shaders/class1/deferred/emissiveF.glsl | 2 +- .../shaders/class1/deferred/fullbrightF.glsl | 2 +- .../shaders/class1/deferred/fxaaF.glsl | 470 +++++++++--------- .../shaders/class1/deferred/giF.glsl | 2 +- .../class1/deferred/multiPointLightF.glsl | 2 +- .../class1/deferred/multiSpotLightF.glsl | 2 +- .../shaders/class1/deferred/normgenF.glsl | 2 +- .../shaders/class1/deferred/pointLightF.glsl | 2 +- .../class1/deferred/postDeferredF.glsl | 2 +- .../class1/deferred/postDeferredNoDoFF.glsl | 2 +- .../shaders/class1/deferred/softenLightF.glsl | 2 +- .../shaders/class1/deferred/spotLightF.glsl | 2 +- .../shaders/class1/deferred/sunLightF.glsl | 2 +- .../class1/deferred/sunLightSSAOF.glsl | 2 +- .../shaders/class1/deferred/waterF.glsl | 2 +- .../shaders/class1/effects/MotionBlurF.glsl | 2 +- .../shaders/class1/effects/PosterizeF.glsl | 2 +- .../shaders/class1/effects/VignetteF.glsl | 2 +- .../shaders/class1/effects/colorFilterF.glsl | 2 +- .../shaders/class1/effects/gaussBlurF.glsl | 2 +- .../shaders/class1/effects/glowExtractF.glsl | 2 +- .../shaders/class1/effects/nightVisionF.glsl | 2 +- .../class1/interface/glowcombineF.glsl | 2 +- .../class1/interface/glowcombineFXAAF.glsl | 2 +- .../class1/interface/splattexturerectF.glsl | 2 +- .../shaders/class2/deferred/alphaF.glsl | 2 +- .../class2/deferred/alphaNonIndexedF.glsl | 2 +- .../deferred/alphaNonIndexedNoColorF.glsl | 2 +- .../class2/deferred/multiSpotLightF.glsl | 2 +- .../shaders/class2/deferred/softenLightF.glsl | 2 +- .../shaders/class2/deferred/spotLightF.glsl | 2 +- .../shaders/class2/deferred/sunLightF.glsl | 2 +- .../class2/deferred/sunLightSSAOF.glsl | 2 +- 40 files changed, 289 insertions(+), 275 deletions(-) diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index 7b890c57a..baf48298d 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -56,14 +56,14 @@ LLShaderMgr::LLShaderMgr() { { const std::string dumpdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"shader_dump")+gDirUtilp->getDirDelimiter(); - try + /*try { boost::filesystem::remove_all(dumpdir); } catch(const boost::filesystem::filesystem_error& e) { llinfos << "boost::filesystem::remove_all(\""+dumpdir+"\") failed: '" + e.code().message() + "'" << llendl; - } + }*/ } } @@ -614,6 +614,9 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade text[count++] = strdup("#define ATTRIBUTE attribute\n"); text[count++] = strdup("#define VARYING varying\n"); text[count++] = strdup("#define VARYING_FLAT varying\n"); + // Need to enable the GL_ARB_texture_rectangle extension here instead of in the shader files, + // before any non-preprocessor directives (per spec) + text[count++] = strdup("#extension GL_ARB_texture_rectangle : enable\n"); } else if (minor_version <= 29) { @@ -624,6 +627,9 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade text[count++] = strdup("#define ATTRIBUTE attribute\n"); text[count++] = strdup("#define VARYING varying\n"); text[count++] = strdup("#define VARYING_FLAT varying\n"); + // Need to enable the GL_ARB_texture_rectangle extension here instead of in the shader files, + // before any non-preprocessor directives (per spec) + text[count++] = strdup("#extension GL_ARB_texture_rectangle : enable\n"); } } else @@ -632,6 +638,10 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade { //set version to 1.30 text[count++] = strdup("#version 130\n"); + + // Need to enable the GL_ARB_texture_rectangle extension here instead of in the shader files, + // before any non-preprocessor directives (per spec) + text[count++] = strdup("#extension GL_ARB_texture_rectangle : enable\n"); //some implementations of GLSL 1.30 require integer precision be explicitly declared text[count++] = strdup("precision mediump int;\n"); @@ -640,7 +650,11 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade else { //set version to 400 text[count++] = strdup("#version 400\n"); + // Need to enable the GL_ARB_texture_rectangle extension here instead of in the shader files, + // before any non-preprocessor directives (per spec) + text[count++] = strdup("#extension GL_ARB_texture_rectangle : enable\n"); } + text[count++] = strdup("#define DEFINE_GL_FRAGCOLOR 1\n"); text[count++] = strdup("#define FXAA_GLSL_130 1\n"); diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index dd87ddb33..704f3f3c5 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl index beb329018..846ce6a91 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedNoColorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedNoColorF.glsl index 1113a9845..d19092ed9 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedNoColorF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedNoColorF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl index 9a9b889da..3e9a63086 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl index ccbc3c557..bf04caba5 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl index a425e5062..9ddeae18d 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl b/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl index 6aa4d7b4e..574d944a1 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index 36433a582..80d77b4dc 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl index e02a7b405..2371eed3b 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fxaaF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; @@ -33,7 +33,7 @@ out vec4 frag_color; #define FXAA_PC 1 //#define FXAA_GLSL_130 1 -#define FXAA_QUALITY__PRESET 12 +#define FXAA_QUALITY_M_PRESET 12 /*============================================================================ @@ -66,7 +66,7 @@ Example, #define FXAA_PC 1 #define FXAA_HLSL_5 1 - #define FXAA_QUALITY__PRESET 12 + #define FXAA_QUALITY_M_PRESET 12 Or, @@ -365,7 +365,7 @@ A. Or use FXAA_GREEN_AS_LUMA. /*============================================================================ FXAA CONSOLE PS3 - TUNING KNOBS ============================================================================*/ -#ifndef FXAA_CONSOLE__PS3_EDGE_SHARPNESS +#ifndef FXAA_CONSOLE_M_PS3_EDGE_SHARPNESS // // Consoles the sharpness of edges on PS3 only. // Non-PS3 tuning is done with shader input. @@ -379,17 +379,17 @@ A. Or use FXAA_GREEN_AS_LUMA. // 2.0 is really soft (good for vector graphics inputs) // #if 1 - #define FXAA_CONSOLE__PS3_EDGE_SHARPNESS 8.0 + #define FXAA_CONSOLE_M_PS3_EDGE_SHARPNESS 8.0 #endif #if 0 - #define FXAA_CONSOLE__PS3_EDGE_SHARPNESS 4.0 + #define FXAA_CONSOLE_M_PS3_EDGE_SHARPNESS 4.0 #endif #if 0 - #define FXAA_CONSOLE__PS3_EDGE_SHARPNESS 2.0 + #define FXAA_CONSOLE_M_PS3_EDGE_SHARPNESS 2.0 #endif #endif /*--------------------------------------------------------------------------*/ -#ifndef FXAA_CONSOLE__PS3_EDGE_THRESHOLD +#ifndef FXAA_CONSOLE_M_PS3_EDGE_THRESHOLD // // Only effects PS3. // Non-PS3 tuning is done with shader input. @@ -407,9 +407,9 @@ A. Or use FXAA_GREEN_AS_LUMA. // 0.25 leaves more aliasing, and is sharper // #if 1 - #define FXAA_CONSOLE__PS3_EDGE_THRESHOLD 0.125 + #define FXAA_CONSOLE_M_PS3_EDGE_THRESHOLD 0.125 #else - #define FXAA_CONSOLE__PS3_EDGE_THRESHOLD 0.25 + #define FXAA_CONSOLE_M_PS3_EDGE_THRESHOLD 0.25 #endif #endif @@ -418,7 +418,7 @@ A. Or use FXAA_GREEN_AS_LUMA. ------------------------------------------------------------------------------ NOTE the other tuning knobs are now in the shader function inputs! ============================================================================*/ -#ifndef FXAA_QUALITY__PRESET +#ifndef FXAA_QUALITY_M_PRESET // // Choose the quality preset. // This needs to be compiled into the shader as it effects code. @@ -439,7 +439,7 @@ NOTE the other tuning knobs are now in the shader function inputs! // _ = the lowest digit is directly related to performance // _ = the highest digit is directly related to style // - #define FXAA_QUALITY__PRESET 12 + #define FXAA_QUALITY_M_PRESET 12 #endif @@ -452,198 +452,198 @@ NOTE the other tuning knobs are now in the shader function inputs! /*============================================================================ FXAA QUALITY - MEDIUM DITHER PRESETS ============================================================================*/ -#if (FXAA_QUALITY__PRESET == 10) - #define FXAA_QUALITY__PS 3 - #define FXAA_QUALITY__P0 1.5 - #define FXAA_QUALITY__P1 3.0 - #define FXAA_QUALITY__P2 12.0 +#if (FXAA_QUALITY_M_PRESET == 10) + #define FXAA_QUALITY_M_PS 3 + #define FXAA_QUALITY_M_P0 1.5 + #define FXAA_QUALITY_M_P1 3.0 + #define FXAA_QUALITY_M_P2 12.0 #endif /*--------------------------------------------------------------------------*/ -#if (FXAA_QUALITY__PRESET == 11) - #define FXAA_QUALITY__PS 4 - #define FXAA_QUALITY__P0 1.0 - #define FXAA_QUALITY__P1 1.5 - #define FXAA_QUALITY__P2 3.0 - #define FXAA_QUALITY__P3 12.0 +#if (FXAA_QUALITY_M_PRESET == 11) + #define FXAA_QUALITY_M_PS 4 + #define FXAA_QUALITY_M_P0 1.0 + #define FXAA_QUALITY_M_P1 1.5 + #define FXAA_QUALITY_M_P2 3.0 + #define FXAA_QUALITY_M_P3 12.0 #endif /*--------------------------------------------------------------------------*/ -#if (FXAA_QUALITY__PRESET == 12) - #define FXAA_QUALITY__PS 5 - #define FXAA_QUALITY__P0 1.0 - #define FXAA_QUALITY__P1 1.5 - #define FXAA_QUALITY__P2 2.0 - #define FXAA_QUALITY__P3 4.0 - #define FXAA_QUALITY__P4 12.0 +#if (FXAA_QUALITY_M_PRESET == 12) + #define FXAA_QUALITY_M_PS 5 + #define FXAA_QUALITY_M_P0 1.0 + #define FXAA_QUALITY_M_P1 1.5 + #define FXAA_QUALITY_M_P2 2.0 + #define FXAA_QUALITY_M_P3 4.0 + #define FXAA_QUALITY_M_P4 12.0 #endif /*--------------------------------------------------------------------------*/ -#if (FXAA_QUALITY__PRESET == 13) - #define FXAA_QUALITY__PS 6 - #define FXAA_QUALITY__P0 1.0 - #define FXAA_QUALITY__P1 1.5 - #define FXAA_QUALITY__P2 2.0 - #define FXAA_QUALITY__P3 2.0 - #define FXAA_QUALITY__P4 4.0 - #define FXAA_QUALITY__P5 12.0 +#if (FXAA_QUALITY_M_PRESET == 13) + #define FXAA_QUALITY_M_PS 6 + #define FXAA_QUALITY_M_P0 1.0 + #define FXAA_QUALITY_M_P1 1.5 + #define FXAA_QUALITY_M_P2 2.0 + #define FXAA_QUALITY_M_P3 2.0 + #define FXAA_QUALITY_M_P4 4.0 + #define FXAA_QUALITY_M_P5 12.0 #endif /*--------------------------------------------------------------------------*/ -#if (FXAA_QUALITY__PRESET == 14) - #define FXAA_QUALITY__PS 7 - #define FXAA_QUALITY__P0 1.0 - #define FXAA_QUALITY__P1 1.5 - #define FXAA_QUALITY__P2 2.0 - #define FXAA_QUALITY__P3 2.0 - #define FXAA_QUALITY__P4 2.0 - #define FXAA_QUALITY__P5 4.0 - #define FXAA_QUALITY__P6 12.0 +#if (FXAA_QUALITY_M_PRESET == 14) + #define FXAA_QUALITY_M_PS 7 + #define FXAA_QUALITY_M_P0 1.0 + #define FXAA_QUALITY_M_P1 1.5 + #define FXAA_QUALITY_M_P2 2.0 + #define FXAA_QUALITY_M_P3 2.0 + #define FXAA_QUALITY_M_P4 2.0 + #define FXAA_QUALITY_M_P5 4.0 + #define FXAA_QUALITY_M_P6 12.0 #endif /*--------------------------------------------------------------------------*/ -#if (FXAA_QUALITY__PRESET == 15) - #define FXAA_QUALITY__PS 8 - #define FXAA_QUALITY__P0 1.0 - #define FXAA_QUALITY__P1 1.5 - #define FXAA_QUALITY__P2 2.0 - #define FXAA_QUALITY__P3 2.0 - #define FXAA_QUALITY__P4 2.0 - #define FXAA_QUALITY__P5 2.0 - #define FXAA_QUALITY__P6 4.0 - #define FXAA_QUALITY__P7 12.0 +#if (FXAA_QUALITY_M_PRESET == 15) + #define FXAA_QUALITY_M_PS 8 + #define FXAA_QUALITY_M_P0 1.0 + #define FXAA_QUALITY_M_P1 1.5 + #define FXAA_QUALITY_M_P2 2.0 + #define FXAA_QUALITY_M_P3 2.0 + #define FXAA_QUALITY_M_P4 2.0 + #define FXAA_QUALITY_M_P5 2.0 + #define FXAA_QUALITY_M_P6 4.0 + #define FXAA_QUALITY_M_P7 12.0 #endif /*============================================================================ FXAA QUALITY - LOW DITHER PRESETS ============================================================================*/ -#if (FXAA_QUALITY__PRESET == 20) - #define FXAA_QUALITY__PS 3 - #define FXAA_QUALITY__P0 1.5 - #define FXAA_QUALITY__P1 2.0 - #define FXAA_QUALITY__P2 8.0 +#if (FXAA_QUALITY_M_PRESET == 20) + #define FXAA_QUALITY_M_PS 3 + #define FXAA_QUALITY_M_P0 1.5 + #define FXAA_QUALITY_M_P1 2.0 + #define FXAA_QUALITY_M_P2 8.0 #endif /*--------------------------------------------------------------------------*/ -#if (FXAA_QUALITY__PRESET == 21) - #define FXAA_QUALITY__PS 4 - #define FXAA_QUALITY__P0 1.0 - #define FXAA_QUALITY__P1 1.5 - #define FXAA_QUALITY__P2 2.0 - #define FXAA_QUALITY__P3 8.0 +#if (FXAA_QUALITY_M_PRESET == 21) + #define FXAA_QUALITY_M_PS 4 + #define FXAA_QUALITY_M_P0 1.0 + #define FXAA_QUALITY_M_P1 1.5 + #define FXAA_QUALITY_M_P2 2.0 + #define FXAA_QUALITY_M_P3 8.0 #endif /*--------------------------------------------------------------------------*/ -#if (FXAA_QUALITY__PRESET == 22) - #define FXAA_QUALITY__PS 5 - #define FXAA_QUALITY__P0 1.0 - #define FXAA_QUALITY__P1 1.5 - #define FXAA_QUALITY__P2 2.0 - #define FXAA_QUALITY__P3 2.0 - #define FXAA_QUALITY__P4 8.0 +#if (FXAA_QUALITY_M_PRESET == 22) + #define FXAA_QUALITY_M_PS 5 + #define FXAA_QUALITY_M_P0 1.0 + #define FXAA_QUALITY_M_P1 1.5 + #define FXAA_QUALITY_M_P2 2.0 + #define FXAA_QUALITY_M_P3 2.0 + #define FXAA_QUALITY_M_P4 8.0 #endif /*--------------------------------------------------------------------------*/ -#if (FXAA_QUALITY__PRESET == 23) - #define FXAA_QUALITY__PS 6 - #define FXAA_QUALITY__P0 1.0 - #define FXAA_QUALITY__P1 1.5 - #define FXAA_QUALITY__P2 2.0 - #define FXAA_QUALITY__P3 2.0 - #define FXAA_QUALITY__P4 2.0 - #define FXAA_QUALITY__P5 8.0 +#if (FXAA_QUALITY_M_PRESET == 23) + #define FXAA_QUALITY_M_PS 6 + #define FXAA_QUALITY_M_P0 1.0 + #define FXAA_QUALITY_M_P1 1.5 + #define FXAA_QUALITY_M_P2 2.0 + #define FXAA_QUALITY_M_P3 2.0 + #define FXAA_QUALITY_M_P4 2.0 + #define FXAA_QUALITY_M_P5 8.0 #endif /*--------------------------------------------------------------------------*/ -#if (FXAA_QUALITY__PRESET == 24) - #define FXAA_QUALITY__PS 7 - #define FXAA_QUALITY__P0 1.0 - #define FXAA_QUALITY__P1 1.5 - #define FXAA_QUALITY__P2 2.0 - #define FXAA_QUALITY__P3 2.0 - #define FXAA_QUALITY__P4 2.0 - #define FXAA_QUALITY__P5 3.0 - #define FXAA_QUALITY__P6 8.0 +#if (FXAA_QUALITY_M_PRESET == 24) + #define FXAA_QUALITY_M_PS 7 + #define FXAA_QUALITY_M_P0 1.0 + #define FXAA_QUALITY_M_P1 1.5 + #define FXAA_QUALITY_M_P2 2.0 + #define FXAA_QUALITY_M_P3 2.0 + #define FXAA_QUALITY_M_P4 2.0 + #define FXAA_QUALITY_M_P5 3.0 + #define FXAA_QUALITY_M_P6 8.0 #endif /*--------------------------------------------------------------------------*/ -#if (FXAA_QUALITY__PRESET == 25) - #define FXAA_QUALITY__PS 8 - #define FXAA_QUALITY__P0 1.0 - #define FXAA_QUALITY__P1 1.5 - #define FXAA_QUALITY__P2 2.0 - #define FXAA_QUALITY__P3 2.0 - #define FXAA_QUALITY__P4 2.0 - #define FXAA_QUALITY__P5 2.0 - #define FXAA_QUALITY__P6 4.0 - #define FXAA_QUALITY__P7 8.0 +#if (FXAA_QUALITY_M_PRESET == 25) + #define FXAA_QUALITY_M_PS 8 + #define FXAA_QUALITY_M_P0 1.0 + #define FXAA_QUALITY_M_P1 1.5 + #define FXAA_QUALITY_M_P2 2.0 + #define FXAA_QUALITY_M_P3 2.0 + #define FXAA_QUALITY_M_P4 2.0 + #define FXAA_QUALITY_M_P5 2.0 + #define FXAA_QUALITY_M_P6 4.0 + #define FXAA_QUALITY_M_P7 8.0 #endif /*--------------------------------------------------------------------------*/ -#if (FXAA_QUALITY__PRESET == 26) - #define FXAA_QUALITY__PS 9 - #define FXAA_QUALITY__P0 1.0 - #define FXAA_QUALITY__P1 1.5 - #define FXAA_QUALITY__P2 2.0 - #define FXAA_QUALITY__P3 2.0 - #define FXAA_QUALITY__P4 2.0 - #define FXAA_QUALITY__P5 2.0 - #define FXAA_QUALITY__P6 2.0 - #define FXAA_QUALITY__P7 4.0 - #define FXAA_QUALITY__P8 8.0 +#if (FXAA_QUALITY_M_PRESET == 26) + #define FXAA_QUALITY_M_PS 9 + #define FXAA_QUALITY_M_P0 1.0 + #define FXAA_QUALITY_M_P1 1.5 + #define FXAA_QUALITY_M_P2 2.0 + #define FXAA_QUALITY_M_P3 2.0 + #define FXAA_QUALITY_M_P4 2.0 + #define FXAA_QUALITY_M_P5 2.0 + #define FXAA_QUALITY_M_P6 2.0 + #define FXAA_QUALITY_M_P7 4.0 + #define FXAA_QUALITY_M_P8 8.0 #endif /*--------------------------------------------------------------------------*/ -#if (FXAA_QUALITY__PRESET == 27) - #define FXAA_QUALITY__PS 10 - #define FXAA_QUALITY__P0 1.0 - #define FXAA_QUALITY__P1 1.5 - #define FXAA_QUALITY__P2 2.0 - #define FXAA_QUALITY__P3 2.0 - #define FXAA_QUALITY__P4 2.0 - #define FXAA_QUALITY__P5 2.0 - #define FXAA_QUALITY__P6 2.0 - #define FXAA_QUALITY__P7 2.0 - #define FXAA_QUALITY__P8 4.0 - #define FXAA_QUALITY__P9 8.0 +#if (FXAA_QUALITY_M_PRESET == 27) + #define FXAA_QUALITY_M_PS 10 + #define FXAA_QUALITY_M_P0 1.0 + #define FXAA_QUALITY_M_P1 1.5 + #define FXAA_QUALITY_M_P2 2.0 + #define FXAA_QUALITY_M_P3 2.0 + #define FXAA_QUALITY_M_P4 2.0 + #define FXAA_QUALITY_M_P5 2.0 + #define FXAA_QUALITY_M_P6 2.0 + #define FXAA_QUALITY_M_P7 2.0 + #define FXAA_QUALITY_M_P8 4.0 + #define FXAA_QUALITY_M_P9 8.0 #endif /*--------------------------------------------------------------------------*/ -#if (FXAA_QUALITY__PRESET == 28) - #define FXAA_QUALITY__PS 11 - #define FXAA_QUALITY__P0 1.0 - #define FXAA_QUALITY__P1 1.5 - #define FXAA_QUALITY__P2 2.0 - #define FXAA_QUALITY__P3 2.0 - #define FXAA_QUALITY__P4 2.0 - #define FXAA_QUALITY__P5 2.0 - #define FXAA_QUALITY__P6 2.0 - #define FXAA_QUALITY__P7 2.0 - #define FXAA_QUALITY__P8 2.0 - #define FXAA_QUALITY__P9 4.0 - #define FXAA_QUALITY__P10 8.0 +#if (FXAA_QUALITY_M_PRESET == 28) + #define FXAA_QUALITY_M_PS 11 + #define FXAA_QUALITY_M_P0 1.0 + #define FXAA_QUALITY_M_P1 1.5 + #define FXAA_QUALITY_M_P2 2.0 + #define FXAA_QUALITY_M_P3 2.0 + #define FXAA_QUALITY_M_P4 2.0 + #define FXAA_QUALITY_M_P5 2.0 + #define FXAA_QUALITY_M_P6 2.0 + #define FXAA_QUALITY_M_P7 2.0 + #define FXAA_QUALITY_M_P8 2.0 + #define FXAA_QUALITY_M_P9 4.0 + #define FXAA_QUALITY_M_P10 8.0 #endif /*--------------------------------------------------------------------------*/ -#if (FXAA_QUALITY__PRESET == 29) - #define FXAA_QUALITY__PS 12 - #define FXAA_QUALITY__P0 1.0 - #define FXAA_QUALITY__P1 1.5 - #define FXAA_QUALITY__P2 2.0 - #define FXAA_QUALITY__P3 2.0 - #define FXAA_QUALITY__P4 2.0 - #define FXAA_QUALITY__P5 2.0 - #define FXAA_QUALITY__P6 2.0 - #define FXAA_QUALITY__P7 2.0 - #define FXAA_QUALITY__P8 2.0 - #define FXAA_QUALITY__P9 2.0 - #define FXAA_QUALITY__P10 4.0 - #define FXAA_QUALITY__P11 8.0 +#if (FXAA_QUALITY_M_PRESET == 29) + #define FXAA_QUALITY_M_PS 12 + #define FXAA_QUALITY_M_P0 1.0 + #define FXAA_QUALITY_M_P1 1.5 + #define FXAA_QUALITY_M_P2 2.0 + #define FXAA_QUALITY_M_P3 2.0 + #define FXAA_QUALITY_M_P4 2.0 + #define FXAA_QUALITY_M_P5 2.0 + #define FXAA_QUALITY_M_P6 2.0 + #define FXAA_QUALITY_M_P7 2.0 + #define FXAA_QUALITY_M_P8 2.0 + #define FXAA_QUALITY_M_P9 2.0 + #define FXAA_QUALITY_M_P10 4.0 + #define FXAA_QUALITY_M_P11 8.0 #endif /*============================================================================ FXAA QUALITY - EXTREME QUALITY ============================================================================*/ -#if (FXAA_QUALITY__PRESET == 39) - #define FXAA_QUALITY__PS 12 - #define FXAA_QUALITY__P0 1.0 - #define FXAA_QUALITY__P1 1.0 - #define FXAA_QUALITY__P2 1.0 - #define FXAA_QUALITY__P3 1.0 - #define FXAA_QUALITY__P4 1.0 - #define FXAA_QUALITY__P5 1.5 - #define FXAA_QUALITY__P6 2.0 - #define FXAA_QUALITY__P7 2.0 - #define FXAA_QUALITY__P8 2.0 - #define FXAA_QUALITY__P9 2.0 - #define FXAA_QUALITY__P10 4.0 - #define FXAA_QUALITY__P11 8.0 +#if (FXAA_QUALITY_M_PRESET == 39) + #define FXAA_QUALITY_M_PS 12 + #define FXAA_QUALITY_M_P0 1.0 + #define FXAA_QUALITY_M_P1 1.0 + #define FXAA_QUALITY_M_P2 1.0 + #define FXAA_QUALITY_M_P3 1.0 + #define FXAA_QUALITY_M_P4 1.0 + #define FXAA_QUALITY_M_P5 1.5 + #define FXAA_QUALITY_M_P6 2.0 + #define FXAA_QUALITY_M_P7 2.0 + #define FXAA_QUALITY_M_P8 2.0 + #define FXAA_QUALITY_M_P9 2.0 + #define FXAA_QUALITY_M_P10 4.0 + #define FXAA_QUALITY_M_P11 8.0 #endif @@ -868,7 +868,7 @@ FxaaFloat4 FxaaPixelShader( // This used to be the FXAA_CONSOLE__EDGE_SHARPNESS define. // It is here now to allow easier tuning. // This does not effect PS3, as this needs to be compiled in. - // Use FXAA_CONSOLE__PS3_EDGE_SHARPNESS for PS3. + // Use FXAA_CONSOLE_M_PS3_EDGE_SHARPNESS for PS3. // Due to the PS3 being ALU bound, // there are only three safe values here: 2 and 4 and 8. // These options use the shaders ability to a free *|/ by 2|4|8. @@ -882,7 +882,7 @@ FxaaFloat4 FxaaPixelShader( // This used to be the FXAA_CONSOLE__EDGE_THRESHOLD define. // It is here now to allow easier tuning. // This does not effect PS3, as this needs to be compiled in. - // Use FXAA_CONSOLE__PS3_EDGE_THRESHOLD for PS3. + // Use FXAA_CONSOLE_M_PS3_EDGE_THRESHOLD for PS3. // Due to the PS3 being ALU bound, // there are only two safe values here: 1/4 and 1/8. // These options use the shaders ability to a free *|/ by 2|4|8. @@ -1040,11 +1040,11 @@ FxaaFloat4 FxaaPixelShader( if( horzSpan) posB.y += lengthSign * 0.5; /*--------------------------------------------------------------------------*/ FxaaFloat2 posN; - posN.x = posB.x - offNP.x * FXAA_QUALITY__P0; - posN.y = posB.y - offNP.y * FXAA_QUALITY__P0; + posN.x = posB.x - offNP.x * FXAA_QUALITY_M_P0; + posN.y = posB.y - offNP.y * FXAA_QUALITY_M_P0; FxaaFloat2 posP; - posP.x = posB.x + offNP.x * FXAA_QUALITY__P0; - posP.y = posB.y + offNP.y * FXAA_QUALITY__P0; + posP.x = posB.x + offNP.x * FXAA_QUALITY_M_P0; + posP.y = posB.y + offNP.y * FXAA_QUALITY_M_P0; FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0; FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN)); FxaaFloat subpixE = subpixC * subpixC; @@ -1060,11 +1060,11 @@ FxaaFloat4 FxaaPixelShader( lumaEndP -= lumaNN * 0.5; FxaaBool doneN = abs(lumaEndN) >= gradientScaled; FxaaBool doneP = abs(lumaEndP) >= gradientScaled; - if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P1; - if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P1; + if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_M_P1; + if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_M_P1; FxaaBool doneNP = (!doneN) || (!doneP); - if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P1; - if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P1; + if(!doneP) posP.x += offNP.x * FXAA_QUALITY_M_P1; + if(!doneP) posP.y += offNP.y * FXAA_QUALITY_M_P1; /*--------------------------------------------------------------------------*/ if(doneNP) { if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy)); @@ -1073,13 +1073,13 @@ FxaaFloat4 FxaaPixelShader( if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5; doneN = abs(lumaEndN) >= gradientScaled; doneP = abs(lumaEndP) >= gradientScaled; - if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P2; - if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P2; + if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_M_P2; + if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_M_P2; doneNP = (!doneN) || (!doneP); - if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P2; - if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P2; + if(!doneP) posP.x += offNP.x * FXAA_QUALITY_M_P2; + if(!doneP) posP.y += offNP.y * FXAA_QUALITY_M_P2; /*--------------------------------------------------------------------------*/ - #if (FXAA_QUALITY__PS > 3) + #if (FXAA_QUALITY_M_PS > 3) if(doneNP) { if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy)); if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy)); @@ -1087,13 +1087,13 @@ FxaaFloat4 FxaaPixelShader( if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5; doneN = abs(lumaEndN) >= gradientScaled; doneP = abs(lumaEndP) >= gradientScaled; - if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P3; - if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P3; + if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_M_P3; + if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_M_P3; doneNP = (!doneN) || (!doneP); - if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P3; - if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P3; + if(!doneP) posP.x += offNP.x * FXAA_QUALITY_M_P3; + if(!doneP) posP.y += offNP.y * FXAA_QUALITY_M_P3; /*--------------------------------------------------------------------------*/ - #if (FXAA_QUALITY__PS > 4) + #if (FXAA_QUALITY_M_PS > 4) if(doneNP) { if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy)); if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy)); @@ -1101,13 +1101,13 @@ FxaaFloat4 FxaaPixelShader( if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5; doneN = abs(lumaEndN) >= gradientScaled; doneP = abs(lumaEndP) >= gradientScaled; - if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P4; - if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P4; + if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_M_P4; + if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_M_P4; doneNP = (!doneN) || (!doneP); - if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P4; - if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P4; + if(!doneP) posP.x += offNP.x * FXAA_QUALITY_M_P4; + if(!doneP) posP.y += offNP.y * FXAA_QUALITY_M_P4; /*--------------------------------------------------------------------------*/ - #if (FXAA_QUALITY__PS > 5) + #if (FXAA_QUALITY_M_PS > 5) if(doneNP) { if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy)); if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy)); @@ -1115,13 +1115,13 @@ FxaaFloat4 FxaaPixelShader( if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5; doneN = abs(lumaEndN) >= gradientScaled; doneP = abs(lumaEndP) >= gradientScaled; - if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P5; - if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P5; + if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_M_P5; + if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_M_P5; doneNP = (!doneN) || (!doneP); - if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P5; - if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P5; + if(!doneP) posP.x += offNP.x * FXAA_QUALITY_M_P5; + if(!doneP) posP.y += offNP.y * FXAA_QUALITY_M_P5; /*--------------------------------------------------------------------------*/ - #if (FXAA_QUALITY__PS > 6) + #if (FXAA_QUALITY_M_PS > 6) if(doneNP) { if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy)); if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy)); @@ -1129,13 +1129,13 @@ FxaaFloat4 FxaaPixelShader( if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5; doneN = abs(lumaEndN) >= gradientScaled; doneP = abs(lumaEndP) >= gradientScaled; - if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P6; - if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P6; + if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_M_P6; + if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_M_P6; doneNP = (!doneN) || (!doneP); - if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P6; - if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P6; + if(!doneP) posP.x += offNP.x * FXAA_QUALITY_M_P6; + if(!doneP) posP.y += offNP.y * FXAA_QUALITY_M_P6; /*--------------------------------------------------------------------------*/ - #if (FXAA_QUALITY__PS > 7) + #if (FXAA_QUALITY_M_PS > 7) if(doneNP) { if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy)); if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy)); @@ -1143,13 +1143,13 @@ FxaaFloat4 FxaaPixelShader( if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5; doneN = abs(lumaEndN) >= gradientScaled; doneP = abs(lumaEndP) >= gradientScaled; - if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P7; - if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P7; + if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_M_P7; + if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_M_P7; doneNP = (!doneN) || (!doneP); - if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P7; - if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P7; + if(!doneP) posP.x += offNP.x * FXAA_QUALITY_M_P7; + if(!doneP) posP.y += offNP.y * FXAA_QUALITY_M_P7; /*--------------------------------------------------------------------------*/ - #if (FXAA_QUALITY__PS > 8) + #if (FXAA_QUALITY_M_PS > 8) if(doneNP) { if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy)); if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy)); @@ -1157,13 +1157,13 @@ FxaaFloat4 FxaaPixelShader( if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5; doneN = abs(lumaEndN) >= gradientScaled; doneP = abs(lumaEndP) >= gradientScaled; - if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P8; - if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P8; + if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_M_P8; + if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_M_P8; doneNP = (!doneN) || (!doneP); - if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P8; - if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P8; + if(!doneP) posP.x += offNP.x * FXAA_QUALITY_M_P8; + if(!doneP) posP.y += offNP.y * FXAA_QUALITY_M_P8; /*--------------------------------------------------------------------------*/ - #if (FXAA_QUALITY__PS > 9) + #if (FXAA_QUALITY_M_PS > 9) if(doneNP) { if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy)); if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy)); @@ -1171,13 +1171,13 @@ FxaaFloat4 FxaaPixelShader( if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5; doneN = abs(lumaEndN) >= gradientScaled; doneP = abs(lumaEndP) >= gradientScaled; - if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P9; - if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P9; + if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_M_P9; + if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_M_P9; doneNP = (!doneN) || (!doneP); - if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P9; - if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P9; + if(!doneP) posP.x += offNP.x * FXAA_QUALITY_M_P9; + if(!doneP) posP.y += offNP.y * FXAA_QUALITY_M_P9; /*--------------------------------------------------------------------------*/ - #if (FXAA_QUALITY__PS > 10) + #if (FXAA_QUALITY_M_PS > 10) if(doneNP) { if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy)); if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy)); @@ -1185,13 +1185,13 @@ FxaaFloat4 FxaaPixelShader( if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5; doneN = abs(lumaEndN) >= gradientScaled; doneP = abs(lumaEndP) >= gradientScaled; - if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P10; - if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P10; + if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_M_P10; + if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_M_P10; doneNP = (!doneN) || (!doneP); - if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P10; - if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P10; + if(!doneP) posP.x += offNP.x * FXAA_QUALITY_M_P10; + if(!doneP) posP.y += offNP.y * FXAA_QUALITY_M_P10; /*--------------------------------------------------------------------------*/ - #if (FXAA_QUALITY__PS > 11) + #if (FXAA_QUALITY_M_PS > 11) if(doneNP) { if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy)); if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy)); @@ -1199,13 +1199,13 @@ FxaaFloat4 FxaaPixelShader( if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5; doneN = abs(lumaEndN) >= gradientScaled; doneP = abs(lumaEndP) >= gradientScaled; - if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P11; - if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P11; + if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_M_P11; + if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_M_P11; doneNP = (!doneN) || (!doneP); - if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P11; - if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P11; + if(!doneP) posP.x += offNP.x * FXAA_QUALITY_M_P11; + if(!doneP) posP.y += offNP.y * FXAA_QUALITY_M_P11; /*--------------------------------------------------------------------------*/ - #if (FXAA_QUALITY__PS > 12) + #if (FXAA_QUALITY_M_PS > 12) if(doneNP) { if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy)); if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy)); @@ -1213,11 +1213,11 @@ FxaaFloat4 FxaaPixelShader( if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5; doneN = abs(lumaEndN) >= gradientScaled; doneP = abs(lumaEndP) >= gradientScaled; - if(!doneN) posN.x -= offNP.x * FXAA_QUALITY__P12; - if(!doneN) posN.y -= offNP.y * FXAA_QUALITY__P12; + if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_M_P12; + if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_M_P12; doneNP = (!doneN) || (!doneP); - if(!doneP) posP.x += offNP.x * FXAA_QUALITY__P12; - if(!doneP) posP.y += offNP.y * FXAA_QUALITY__P12; + if(!doneP) posP.x += offNP.x * FXAA_QUALITY_M_P12; + if(!doneP) posP.y += offNP.y * FXAA_QUALITY_M_P12; /*--------------------------------------------------------------------------*/ } #endif @@ -1290,9 +1290,9 @@ FxaaFloat4 FxaaPixelShader( ------------------------------------------------------------------------------ Instead of using this on PC, I'd suggest just using FXAA Quality with - #define FXAA_QUALITY__PRESET 10 + #define FXAA_QUALITY_M_PRESET 10 Or - #define FXAA_QUALITY__PRESET 20 + #define FXAA_QUALITY_M_PRESET 20 Either are higher qualilty and almost as fast as this on modern PC GPUs. ============================================================================*/ #if (FXAA_PC_CONSOLE == 1) @@ -1703,7 +1703,7 @@ half4 FxaaPixelShader( // (5) half4 dir1_pos; dir1_pos.xy = normalize(dir.xyz).xz; - half dirAbsMinTimesC = min(abs(dir1_pos.x), abs(dir1_pos.y)) * half(FXAA_CONSOLE__PS3_EDGE_SHARPNESS); + half dirAbsMinTimesC = min(abs(dir1_pos.x), abs(dir1_pos.y)) * half(FXAA_CONSOLE_M_PS3_EDGE_SHARPNESS); /*--------------------------------------------------------------------------*/ // (6) half4 dir2_pos; @@ -2018,7 +2018,7 @@ half4 FxaaPixelShader( // (6) half4 dir1_pos; dir1_pos.xy = normalize(dir).xz; - half dirAbsMinTimes8 = min(abs(dir1_pos.x), abs(dir1_pos.y)) * half(FXAA_CONSOLE__PS3_EDGE_SHARPNESS); + half dirAbsMinTimes8 = min(abs(dir1_pos.x), abs(dir1_pos.y)) * half(FXAA_CONSOLE_M_PS3_EDGE_SHARPNESS); /*--------------------------------------------------------------------------*/ // (7) half4 dir2_pos; @@ -2060,7 +2060,7 @@ half4 FxaaPixelShader( temp2N = h4tex2Dlod(tex, half4(temp2N.xy, 0.0, 0.0)); half4 rgby2; rgby2.xy = dir2_pos.zw + dir2_pos.xy * fxaaConsoleRcpFrameOpt2.zw; - half lumaRangeM = (lumaMaxM - lumaMinM) / FXAA_CONSOLE__PS3_EDGE_THRESHOLD; + half lumaRangeM = (lumaMaxM - lumaMinM) / FXAA_CONSOLE_M_PS3_EDGE_THRESHOLD; /*--------------------------------------------------------------------------*/ // (12) rgby2 = h4tex2Dlod(tex, half4(rgby2.xy, 0.0, 0.0)); diff --git a/indra/newview/app_settings/shaders/class1/deferred/giF.glsl b/indra/newview/app_settings/shaders/class1/deferred/giF.glsl index da1b23424..acd3c1798 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/giF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/giF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl index 26aa34107..28b363d6d 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl index a82ba899a..fa74995d5 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl @@ -31,7 +31,7 @@ out vec4 frag_color; //class 1 -- no shadows -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable uniform sampler2DRect diffuseRect; uniform sampler2DRect specularRect; diff --git a/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl index 62cfa5c31..1291cfe97 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl index 6c1ff1660..14e935f2c 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl index bf362e21a..46ab281fd 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl index eb5beeef3..b4e2ecfcc 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl index 066cdd348..d879c76db 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl index ae64d8937..7a6954f89 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl @@ -32,7 +32,7 @@ out vec4 frag_color; //class 1 -- no shadows -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable uniform sampler2DRect diffuseRect; uniform sampler2DRect specularRect; diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl index 5ca817aff..bc7837291 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl @@ -25,7 +25,7 @@ //class 1, no shadow, no SSAO, should never be called -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl index 24a827e91..3b553078f 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl @@ -23,7 +23,7 @@ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl index b27822814..db15dad4d 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_data[3]; diff --git a/indra/newview/app_settings/shaders/class1/effects/MotionBlurF.glsl b/indra/newview/app_settings/shaders/class1/effects/MotionBlurF.glsl index efa1265a1..f2b4900b4 100644 --- a/indra/newview/app_settings/shaders/class1/effects/MotionBlurF.glsl +++ b/indra/newview/app_settings/shaders/class1/effects/MotionBlurF.glsl @@ -5,7 +5,7 @@ * $License$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/effects/PosterizeF.glsl b/indra/newview/app_settings/shaders/class1/effects/PosterizeF.glsl index 0f8b2f8f2..fe983c258 100644 --- a/indra/newview/app_settings/shaders/class1/effects/PosterizeF.glsl +++ b/indra/newview/app_settings/shaders/class1/effects/PosterizeF.glsl @@ -5,7 +5,7 @@ * $License$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/effects/VignetteF.glsl b/indra/newview/app_settings/shaders/class1/effects/VignetteF.glsl index ad989e1a0..f3a6f4324 100644 --- a/indra/newview/app_settings/shaders/class1/effects/VignetteF.glsl +++ b/indra/newview/app_settings/shaders/class1/effects/VignetteF.glsl @@ -5,7 +5,7 @@ * $License$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/effects/colorFilterF.glsl b/indra/newview/app_settings/shaders/class1/effects/colorFilterF.glsl index 6acd277bb..8a948b119 100644 --- a/indra/newview/app_settings/shaders/class1/effects/colorFilterF.glsl +++ b/indra/newview/app_settings/shaders/class1/effects/colorFilterF.glsl @@ -5,7 +5,7 @@ * $License$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/effects/gaussBlurF.glsl b/indra/newview/app_settings/shaders/class1/effects/gaussBlurF.glsl index 6c56e2108..db12800a3 100644 --- a/indra/newview/app_settings/shaders/class1/effects/gaussBlurF.glsl +++ b/indra/newview/app_settings/shaders/class1/effects/gaussBlurF.glsl @@ -1,4 +1,4 @@ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl index 0f5eb288f..4f3690383 100644 --- a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl +++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/effects/nightVisionF.glsl b/indra/newview/app_settings/shaders/class1/effects/nightVisionF.glsl index 6257c4e9b..998d8eb18 100644 --- a/indra/newview/app_settings/shaders/class1/effects/nightVisionF.glsl +++ b/indra/newview/app_settings/shaders/class1/effects/nightVisionF.glsl @@ -5,7 +5,7 @@ * $License$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl index ed803de27..891b971f1 100644 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl @@ -29,7 +29,7 @@ out vec4 frag_color; #define frag_color gl_FragColor #endif -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable uniform sampler2D glowMap; uniform sampler2DRect screenMap; diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl index 59520bb99..147de39c4 100644 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl b/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl index 772bb374e..2e47c0023 100644 --- a/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl index 8db4cb58c..cc04e8ecd 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl index 33958a501..e0a229d8c 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl index 2093fc37d..2a38361f8 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl index 7f6a31ef7..a4007600f 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl index d490b5d46..39249bd44 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl index 3a556e913..4a1bf07c7 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl index f8f57e5e7..ca895b341 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl index ddcb024a9..3ca7067a5 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl @@ -22,7 +22,7 @@ * $/LicenseInfo$ */ -#extension GL_ARB_texture_rectangle : enable +//#extension GL_ARB_texture_rectangle : enable #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color;