//------------------------------- //Bloom2.glsl // Blends using weights the blurred image with the sharp one // Params: // OriginalImageWeight // BlurWeight //------------------------------- #ifdef GL_ES precision mediump int; precision mediump float; #endif #define USE_OGRE_FROM_FUTURE #include SAMPLER2D(RT, 0); SAMPLER2D(Blur1, 1); OGRE_UNIFORMS( uniform float OriginalImageWeight; uniform float BlurWeight; ) MAIN_PARAMETERS IN(vec2 oUv0, TEXCOORD0) MAIN_DECLARATION { vec4 sharp = texture2D(RT, oUv0); vec4 blur = texture2D(Blur1, oUv0); gl_FragColor = (blur * vec4_splat(BlurWeight)) + (sharp * vec4_splat(OriginalImageWeight)); }