Change texture opacity depending on angle.

I was thinking about making water change texture opacity depending on the angle you're looking at it, so that water you're looking at at an angle of 48.6 degrees or more turns opaque (irl total internal reflection would reflect the light coming from above the water at that point). This is to make oceans look better as currently you can see way far under the water surface in oceans, while realistically you should only be able to see under the surface directly below you. Now, is it possible to make a texture change depending on the player's relative position? If this isn't possible with textures, is it possible with a vanilla shader? How do i learn to make vanilla shaders?

Continue to help post