How can I make grab Shader similar to Unity - Manual: ShaderLab command: GrabPass in GLSL.
The idea, is that you grab exact pixels from background (ex. from composited renderTarget) and put on rendered object. So it’s like 100% transparency, because it always has the pixels right behind. Later if you disort the pixels, can give very cool effects like Shader - Shadertoy BETA.
SO far I have texture of background (plane to renderTarget), and object cube right before it. My vertex shader for cube is
gl_Position = WVP * spos; and I have no idea how do the frag shader to copy the pixels from background. Any help appreciated.