@Harlanrm
That looks great. Is there anything that prevents that feature from being added to the default MGE water shader?
Guess it depends on what you mean by default. Included with MGE download? Yes, my mod requires a SM 3.0 capable video card (which could exclude some folks from running MGE). If you are wondering why I'm making you rename a file, its because I consider this new feature experimental. The extended load times and fps drop near Vivec would generate a lot of complaints for a feature that many might see as "fluff"
Would it be possible to add this technique to the player when entering / leaving water? How about while surface swimming? Accomplishing that would pretty much finish replacing the only graphical advantage of MW's pixel shaded water.
I thought of this too. My first attempt had some issues though. I could add the waves around the player when they entered the water, but the waves would travel with the player, instead of falling behind. And all the waves would appear/disappear at once instead of propagating out. So I'll have to think about that some more.
I post this picture for a third time for what I imagined Morrowind water to look like.
http://i51.photobucket.com/albums/f386/vtastek/morrowind/morrowindmisc/Rhos_on_Sea_Rocks.jpg
If it is possible, it could be a nice addition.
Thats a nice photo. What do you think about http://www.fifelake.com/photos/FLSunset06B.JPG?
----
I've uploaded the latest changes to the http://planetelderscrolls.gamespy.com/View.php?view=Mods.Detail&id=5869 to PES.
Changes include:
Tweaked non-reflective water shader (looks much more like the reflective one now).
-Added Depth based effects
-Made all the applicable changes that I made to the reflective shader.
Added inGame_sewers.fx file. This file adds the waves around the http://www.youtube.com/watch?v=APZG3qwGqNo
***Optional***
To see the Vivec sewer waves you must rename InGame.fx to something else, then rename InGame_sewers.fx to InGame.fx.
WARNING - using InGame_sewers.fx will cause initial loading times to increase to about 90-180 seconds!
Also you will see a fps decrease near Vivec (I experience a 10% drop)
I did a quick fps comparo:
My inGame.fx
Reflective water shader:
31 - On Vivec canton
46 - Looking towards Vivec (but far enough away to disable the sewer waves)
43 - Looking towards Vivec (but close enough to enable the sewer waves)
Non-reflective water shader:
36 - On Vivec canton
54 - Looking towards Vivec (but far enough away to disable the sewer waves)
50 - Looking towards Vivec (but close enough to enable the sewer waves)
My inGame_sewers.fx
Reflective water shader:
30 - On Vivec canton
46 - Looking towards Vivec (but far enough away to disable the sewer waves)
39 - Looking towards Vivec (but close enough to enable the sewer waves)
Non-reflective water shader:
34 - On Vivec canton
54 - Looking towards Vivec (but far enough away to disable the sewer waves)
45 - Looking towards Vivec (but close enough to enable the sewer waves)
So the bright side is, if you are not near Vivec, you should not see a fps loss using inGame_sewers.fx
Here's the part of the code that adds the sewer waves:
float3 GetWave(float2 pos) { //Big waves headed toward ghostgate float2 wave = sin(fmod(sqrt(pow(pos.x-20000,2)+pow(pos.y-40000,2)),6144)/(6144/6.283185307) + ticks)/16; //Vivec sewer waves //add effect only near Vivec if (EyePos.y < -70000 && EyePos.y > -108200) { if (EyePos.x < 53600 && EyePos.x > 12750) { wave += sin(fmod(sqrt(pow(pos.x-19160,2)+pow(pos.y+86825,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-19160,2)+pow(pos.y+86825,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-19160,2)+pow(pos.y+81900,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-19160,2)+pow(pos.y+81900,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-25275,2)+pow(pos.y+81850,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-25275,2)+pow(pos.y+81850,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-25275,2)+pow(pos.y+86700,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-25275,2)+pow(pos.y+86700,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-25550,2)+pow(pos.y+84940,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-25550,2)+pow(pos.y+84940,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-25550,2)+pow(pos.y+88840,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-25550,2)+pow(pos.y+88840,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-25550,2)+pow(pos.y+91390,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-25550,2)+pow(pos.y+91390,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-25550,2)+pow(pos.y+95230,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-25550,2)+pow(pos.y+95230,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-26300,2)+pow(pos.y+81750,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-26300,2)+pow(pos.y+81750,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-26300,2)+pow(pos.y+77825,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-26300,2)+pow(pos.y+77825,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-32675,2)+pow(pos.y+85300,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-32675,2)+pow(pos.y+85300,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-32675,2)+pow(pos.y+88690,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-32675,2)+pow(pos.y+88690,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-32675,2)+pow(pos.y+91785,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-32675,2)+pow(pos.y+91785,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-32675,2)+pow(pos.y+95020,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-32675,2)+pow(pos.y+95020,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-32975,2)+pow(pos.y+84720,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-32975,2)+pow(pos.y+84720,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-32975,2)+pow(pos.y+89110,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-32975,2)+pow(pos.y+89110,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-32975,2)+pow(pos.y+91190,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-32975,2)+pow(pos.y+91190,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-32975,2)+pow(pos.y+95365,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-32975,2)+pow(pos.y+95365,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-33450,2)+pow(pos.y+77945,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-33450,2)+pow(pos.y+77945,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-33450,2)+pow(pos.y+81635,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-33450,2)+pow(pos.y+81635,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-40100,2)+pow(pos.y+84900,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-40100,2)+pow(pos.y+84900,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-40100,2)+pow(pos.y+88790,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-40100,2)+pow(pos.y+88790,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-40100,2)+pow(pos.y+91395,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-40100,2)+pow(pos.y+91395,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-40100,2)+pow(pos.y+95300,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-40100,2)+pow(pos.y+95300,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-40400,2)+pow(pos.y+81955,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-40400,2)+pow(pos.y+81955,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-40400,2)+pow(pos.y+86900,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-40400,2)+pow(pos.y+86900,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-46500,2)+pow(pos.y+81930,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-46500,2)+pow(pos.y+81930,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-46500,2)+pow(pos.y+86790,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-46500,2)+pow(pos.y+86790,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-27635,2)+pow(pos.y+76700,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-27635,2)+pow(pos.y+76700,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-32165,2)+pow(pos.y+76700,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-32165,2)+pow(pos.y+76700,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-20260,2)+pow(pos.y+80775,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-20260,2)+pow(pos.y+80775,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-24125,2)+pow(pos.y+80775,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-24125,2)+pow(pos.y+80775,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-41475,2)+pow(pos.y+80775,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-41475,2)+pow(pos.y+80775,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-45480,2)+pow(pos.y+80775,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-45480,2)+pow(pos.y+80775,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-27625,2)+pow(pos.y+82800,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-27625,2)+pow(pos.y+82800,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-32150,2)+pow(pos.y+82800,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-32150,2)+pow(pos.y+82800,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-26700,2)+pow(pos.y+83850,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-26700,2)+pow(pos.y+83850,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-31540,2)+pow(pos.y+83850,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-31540,2)+pow(pos.y+83850,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-34480,2)+pow(pos.y+83850,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-34480,2)+pow(pos.y+83850,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-38980,2)+pow(pos.y+83850,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-38980,2)+pow(pos.y+83850,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-20300,2)+pow(pos.y+87915,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-20300,2)+pow(pos.y+87915,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-24225,2)+pow(pos.y+87915,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-24225,2)+pow(pos.y+87915,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-41350,2)+pow(pos.y+87915,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-41350,2)+pow(pos.y+87915,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-45300,2)+pow(pos.y+87915,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-45300,2)+pow(pos.y+87915,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-26630,2)+pow(pos.y+89955,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-26630,2)+pow(pos.y+89955,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-31895,2)+pow(pos.y+89955,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-31895,2)+pow(pos.y+89955,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-34585,2)+pow(pos.y+89955,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-34585,2)+pow(pos.y+89955,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-38500,2)+pow(pos.y+89955,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-38500,2)+pow(pos.y+89955,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-27185,2)+pow(pos.y+90260,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-27185,2)+pow(pos.y+90260,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-31765,2)+pow(pos.y+90260,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-31765,2)+pow(pos.y+90260,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-34120,2)+pow(pos.y+90260,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-34120,2)+pow(pos.y+90260,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-39060,2)+pow(pos.y+90260,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-39060,2)+pow(pos.y+90260,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-26650,2)+pow(pos.y+96365,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-26650,2)+pow(pos.y+96365,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-31615,2)+pow(pos.y+96365,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-31615,2)+pow(pos.y+96365,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-34095,2)+pow(pos.y+96365,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-34095,2)+pow(pos.y+96365,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-38965,2)+pow(pos.y+96365,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-38965,2)+pow(pos.y+96365,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-31180,2)+pow(pos.y+96925,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-31180,2)+pow(pos.y+96925,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-34640,2)+pow(pos.y+96925,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-34640,2)+pow(pos.y+96925,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-31200,2)+pow(pos.y+103770,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-31200,2)+pow(pos.y+103770,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-34695,2)+pow(pos.y+103770,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-34695,2)+pow(pos.y+103770,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-31475,2)+pow(pos.y+104345,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-31475,2)+pow(pos.y+104345,2))/20480,4); wave += sin(fmod(sqrt(pow(pos.x-34175,2)+pow(pos.y+104345,2)),128)/(128/6.283185307) - 4*ticks)/max((pow(pos.x-34175,2)+pow(pos.y+104345,2))/20480,4); }} return float3(wave,0);}