Fix FXAA shader for OpenGL ES 3.

This commit is contained in:
Ryan Houdek 2013-10-29 07:21:55 +00:00
parent 58d42f43e3
commit c8d7db9767
1 changed files with 4 additions and 4 deletions

View File

@ -55,11 +55,11 @@ vec4 applyFXAA(vec2 fragCoord, sampler2D tex)
dir * rcpDirMin)) * inverseVP; dir * rcpDirMin)) * inverseVP;
vec3 rgbA = 0.5 * ( vec3 rgbA = 0.5 * (
texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz + texture(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +
texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz); texture(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);
vec3 rgbB = rgbA * 0.5 + 0.25 * ( vec3 rgbB = rgbA * 0.5 + 0.25 * (
texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz + texture(tex, fragCoord * inverseVP + dir * -0.5).xyz +
texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz); texture(tex, fragCoord * inverseVP + dir * 0.5).xyz);
float lumaB = dot(rgbB, luma); float lumaB = dot(rgbB, luma);
if ((lumaB < lumaMin) || (lumaB > lumaMax)) if ((lumaB < lumaMin) || (lumaB > lumaMax))