Convert glsl 4.0 to 1.2

Hi, Now I’m converting version 400 to 120.

It is a very short 400 code, but rewriting to 120 does not work.
This is the original 400 code. How can we rewrite this to 120?

shader.vert

 #version 400
uniform mat4 modelViewProjectionMatrix;
in vec4 position; 
in vec2 texcoord;

out vec2 vTexCoord;

void main(){
    vTexCoord = texcoord;
    gl_Position = modelViewProjectionMatrix * position;
}

shader.frag

#version 400

uniform sampler2DRect tex;
uniform float rawFft[256];
in vec2 vTexCoord;

out vec4 outputColor;

void main(){

    if (vTexCoord.y < 1.0) {
        int i = int(vTexCoord.x);
        outputColor.r = rawFft[i];
    } else {
        vec2 st = vTexCoord;
        st.y -= 1.0;
        outputColor.r = texture(tex, st).r;
    }
    outputColor.a = 1.0;
}

Hi, you didn’t mention what is the problem. How does it fail?