Sorry to ask the obvious, but what does the alpha channel of your wave texture look like? What does the pixel shader used for the waves output in the alpha channel?
Interesting questions to me, might reveal what I am missing.
1. The texture used for the wave is a .dds file which is provided by the author of the book, I haven't modified it or anything. I am not sure whether if has alpha channel or not. Anyway I could find that out?
2. This is what my pixel shader looks like, no operations using alpha channel other that using the alpha component of the texture and the diffuse material.
float4 main(VertexOut vin) : SV_TARGET
{
vin.NormW = normalize(vin.NormW);
float3 toEye = normalize(gEyePos - vin.PosW);
float4 ambient = float4(0.0f, 0.0f, 0.0f, 0.0f);
float4 diffuse = float4(0.0f, 0.0f, 0.0f, 0.0f);
float4 specular = float4(0.0f, 0.0f, 0.0f, 0.0f);
float4 A, D, S;
[unroll]
for(int i = 0; i < 3; i++)
{
ComputeDirectionalLight(gMaterial, dirLight[i], vin.NormW, toEye, A, D, S);
ambient += A;
diffuse += D;
specular += S;
}
float4 TexColor = diffuseMap.Sample(anisotropic, vin.TexC0); //Sample from the texture
float4 LitColor = TexColor * (ambient + diffuse) + specular;
LitColor.a = gMaterial.Diffuse.a * TexColor.a;
return LitColor;
}