Processing + Eclipse + glsl glass effect

Hi everyone,
I’m currently using succesfully java in eclipse, and using glsl shaders.
I’m trying to replicate a glass effect, and this post seems interesting.

I just don’t understand if (and how) I have to pass a picture (monkey face) to the shader so has to produce the effect on the background.

I would have thought there would be something like

uniform sampler2D texture; (representing background image)
uniform sampler2D glass_map; (the monkey face)

Instead, there is :

  uniform sampler2D u_normal;
  uniform sampler2D u_diffuse;
  uniform sampler2D u_reflection;

Maybe I misunderstood the meaning of the post.
By the way, I only draw 2D things.

Any idea is welcome
thank you
sebastien

1 Like