How does glsl water become transparent

If you look at the water glsl, the final fragcolor in PS() is:
gl_FragColor = vec4(GetFog(finalColor, GetFogFactor(vEyeVec.w)), 1.0);

where alpha = 1.0.

How is the water transparent?

Water is not transparent. Shader mix two textures: rendered scene from main camera (refractColor) and rendered scene from reflection camera (reflectColor).

You can write for test

gl_FragColor = vec4(1.0);

Below is a pic from urho3d wikia page. There is reflection, but you can also see through the water and see the terrain.

I did figure out how to make my ocean shader use alpha. The water shader is still a mystery how the transparency happens.

[quote=“Lumak”]but you can also see through the water and see the terrain.
[/quote]

it is texture on water plane

Thanks, didn’t see that. It makes sense now.