I would like to rewrite the code of the following two GLSL 1.2 versions for GLSL 1.5, what should I do?
fragment
#version 120
uniform sampler2DRect image;
uniform float rand;
varying vec3 pos;
void main (void)
{
vec2 texCoord = vec2(pos.x , pos.y);
vec4 col = texture2DRect(image,texCoord);
vec4 col_r = texture2DRect(image,texCoord + vec2(-35.0*rand,0));
vec4 col_l = texture2DRect(image,texCoord + vec2( 35.0*rand,0));
vec4 col_g = texture2DRect(image,texCoord + vec2( -7.5*rand,0));
col.b = col.b + col_r.b*max(1.0,sin(pos.y*1.2)*2.5)*rand;
col.r = col.r + col_l.r*max(1.0,sin(pos.y*1.2)*2.5)*rand;
col.g = col.g + col_g.g*max(1.0,sin(pos.y*1.2)*2.5)*rand;
gl_FragColor.rgba = col.rgba;
}
vertex
#version 120
varying vec3 pos;
void main(void)
{
pos = gl_Vertex.xyz;
gl_Position = ftransform();
}