Hi sameek…sorry for the delay but I was quite busy… my 1st son was born two weeks ago so my work was left a little behind… and so the forum!
I don’t calculate the real ocean deep… I planar project a greyscale texture where white is max depth and black is 0. Then I have a “Max depth” parameter that I use as value for white.
I know is not a great idea, but it seems to work quite ok. You could have some problems with texture compression (well…I had) but you could try way.
I tried my shader in a more complex scene and I have to say…it seems quite heavy. discouraged me a little… In the future I’ll have to perform heavy optimization…