|
@@ -314,8 +314,19 @@ float CalcLuma(vec3 rgb)
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------*/
|
|
/*--------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
-#define FxaaTexTop(t, p) vec4(texture2DLod(t, p, 0.0).rgb, 1.0)
|
|
|
|
|
|
|
+#ifdef GL3
|
|
|
|
|
+
|
|
|
|
|
+#define FxaaTexTop(t, p) vec4(textureLod(t, p, 0.0).rgb, 1.0)
|
|
|
|
|
+#define LumaTop(t, p) CalcLuma(textureLod(t, p, 0.0).rgb)
|
|
|
|
|
+#if (FXAA_FAST_PIXEL_OFFSET == 1)
|
|
|
|
|
+ #define LumaOff(t, p, o, r) CalcLuma(textureLodOffset(t, p, 0.0, o).rgb)
|
|
|
|
|
+#else
|
|
|
|
|
+ #define LumaOff(t, p, o, r) CalcLuma(textureLod(t, p + (o * r), 0.0).rgb)
|
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
|
+#else
|
|
|
|
|
+
|
|
|
|
|
+#define FxaaTexTop(t, p) vec4(texture2DLod(t, p, 0.0).rgb, 1.0)
|
|
|
#define LumaTop(t, p) CalcLuma(texture2DLod(t, p, 0.0).rgb)
|
|
#define LumaTop(t, p) CalcLuma(texture2DLod(t, p, 0.0).rgb)
|
|
|
#if (FXAA_FAST_PIXEL_OFFSET == 1)
|
|
#if (FXAA_FAST_PIXEL_OFFSET == 1)
|
|
|
#define LumaOff(t, p, o, r) CalcLuma(texture2DLodOffset(t, p, 0.0, o).rgb)
|
|
#define LumaOff(t, p, o, r) CalcLuma(texture2DLodOffset(t, p, 0.0, o).rgb)
|
|
@@ -323,6 +334,8 @@ float CalcLuma(vec3 rgb)
|
|
|
#define LumaOff(t, p, o, r) CalcLuma(texture2DLod(t, p + (o * r), 0.0).rgb)
|
|
#define LumaOff(t, p, o, r) CalcLuma(texture2DLod(t, p + (o * r), 0.0).rgb)
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
/*============================================================================
|
|
/*============================================================================
|
|
|
|
|
|
|
|
FXAA3 QUALITY - PC
|
|
FXAA3 QUALITY - PC
|