Well, just take this in terms of differential geometry. You have a parametric surface with s and t parameters:
X(s,t) = ( s, t, A*sin((s+P)*F) )
So, first we calculate the tangents of this surface, being partial derivatives with respect to our two parameters:
Xs(s,t) = ( 1, 0, A*F*cos((s+P)*F) ) Xt(s,t) = ( 0, 1, 0 )
Then we just need to calculate their transverse product to get the normal:
N = Xs x Xt = ( -A*F*cos((s+P)*F), 0, 1 )
So, your normal computer can be calculated completely analytical, you do not need the gl_Normal attribute:
float angle = (thisPos.x + Phase) * Frequency; thisPos.z = sin(angle) * Amplitude; vec3 normal = normalize(vec3(-Amplitude*Frequency*cos(angle), 0.0, 1.0));
Normalizing normal may not be necessary (since we normalize the transformed norm anyway), but at the moment I'm not sure that a non-normalized norm should behave correctly if there is uneven scaling. Of course, if you want the normal point to point to the negative z-direction, you need to deny it.
Well, a surface path in space would not be necessary. We can just think of a sine curve inside the xz plane, since the y-part of the normal is zero, since only z depends on x. Thus, we simply take the tangent to the curve z=A*sin((x+P)*F) , whose slope is the derivative of z, which is the xz-vector (1, A*F*cos((x+P)*F)) , the normal to this is simply (-A*F*cos((x+P)*F), 1) (switching coords and negation of one), being x and z (non-normalized) normal. Well, there are no three-dimensional vectors and partial derivatives, but the result is the same.