#ifdef GL_ES precision mediump int; precision mediump float; #endif #define USE_OGRE_FROM_FUTURE #include SAMPLER2D(inRTT, 0); OGRE_UNIFORMS( uniform vec2 texelSize; ) MAIN_PARAMETERS IN(vec2 oUv0, TEXCOORD0) MAIN_DECLARATION { vec4 accum = vec4(0.0, 0.0, 0.0, 0.0); // Get colour from source accum += texture2D(inRTT, oUv0 + texelSize * vec2(-1.0, -1.0)); accum += texture2D(inRTT, oUv0 + texelSize * vec2( 0.0, -1.0)); accum += texture2D(inRTT, oUv0 + texelSize * vec2( 1.0, -1.0)); accum += texture2D(inRTT, oUv0 + texelSize * vec2(-1.0, 0.0)); accum += texture2D(inRTT, oUv0 + texelSize * vec2( 0.0, 0.0)); accum += texture2D(inRTT, oUv0 + texelSize * vec2( 1.0, 0.0)); accum += texture2D(inRTT, oUv0 + texelSize * vec2(-1.0, 1.0)); accum += texture2D(inRTT, oUv0 + texelSize * vec2( 0.0, 1.0)); accum += texture2D(inRTT, oUv0 + texelSize * vec2( 1.0, 1.0)); // take average of 9 samples accum *= vec4_splat(0.1111111111111111); gl_FragColor = accum; }