I want to use a RGB texture as described in this video here.
The author says the first line has no R channel and ranges from B = 0 to B = 255. While each other line has R channel = 255 and B = 255 to B = 0 as seen.
His colors do not match with mine. I wrote my shader like this:
#version 110
uniform sampler2D texture;
uniform sampler2D pattern;
uniform float progress;
void main()
{
vec4 displacement = texture2D(pattern, gl_TexCoord[0].xy);
displacement = ((displacement * 2.0) - 1.0) * progress;
vec2 newTexCoord = gl_TexCoord[0].xy + displacement.xy;
vec4 pixel = texture2D(texture, newTexCoord);
vec4 color = gl_Color * pixel;
gl_FragColor = color;
}
which is based off his earlier videos but I'm not getting the effect at all. At best I see interlaced layers moving away but they move diagonally instead of left-right. Plus they clamp instead of leaving black color behind as seen in his video.
Here's what mine looks like: click to view
The author says nothing about G values. Only R and B.
In the YouTube video in 5:01 the author saysThe green value is 128 in every pixel
\$\endgroup\$