Fluid Shader

Hi. How i can create shader for android/ios that do something like that:
BACKGROUND - image behind the plane
plane with shader in foreground

(pseudocode)

if( BACKGROUND[x,y].COLOR.R > 0.5f )
{
   plane_texture[x,y].color.R = 1.0f
}

something like threshold

this “pseudocode” effect will look similar like particles additive shader at front of any BG image.

[x,y] - are values the same for textures?
what plane_texture contains before “pseudocode”? has it alpha?

explain the question if you need a good answer

x, y - coordinates of current pixel.
plane_texture - material without texture, only with shader. If needed empty texture with alpha only.
I want to achieve something like this: