#ifdef GL_ES precision mediump int; precision mediump float; #endif #define USE_OGRE_FROM_FUTURE #include SAMPLER2D(RT, 0); MAIN_PARAMETERS IN(vec2 oUv0, TEXCOORD0) MAIN_DECLARATION { vec4 sc = texture2D(RT, oUv0); float c = dot(sc, vec4(0.30, 0.11, 0.59, 0.00)); float n = sc.r * 2.0 - 1.0; c += n; if (c > 0.5) { c = 0.0; } else { c = 1.0; } gl_FragColor = vec4(c, c, c, 1.0); }