I have a terrain in OpenGL, and two textures which I am combining using GLSL mix() function.
Here are the textures I am using.
Now I am able to combine and mix these two textures, but for some reason, when I render the textures on the terrain, the terrain becomes transparent. I render the LHS texture first, and then I render the RHS texture with alpha channel, I don't understand why it is transparent.
Here is an interesting fact, in the screenshot, you can see the result of the terrain when rendered on Nvidia GPU, when I render the same thing on interl HD 3k, I get different result.
This result is how it is supposed to be, nothing is transparent in this following screenshot.
Here is my fragment shader code..
void main()
{
vec4 dryTex = texture( u_dryTex, vs_texCoord *1 );
vec4 grassTex = texture( u_grassTex, vs_texCoord *1 );
vec4 texColor1= mix(dryTex, grassTex , grassTex.a);
out_fragColor = texColor1;
}