Page 2 of 4

Re: Optional Vanilla Water Shader

Posted: 30 Jun 2018, 17:56
by drummyfish
In my recent 360 degree screenshots I already have the code for creating the environment cubemap. This technique has a lot of drawbacks, the cubemap cannot be rendered each frame, at least not on slower machines - in vanilla it seems to be rerendered each 20 seconds from what I've just tested - that causes the reflection to suddenty change which is not nice. Also in vanilla only terrain and sky is reflected. The result then seems to be just reflection + fresnel, water depth and such seem to be ignored. Should we mirror this bahavior exactly, or should we try to improve it by reflecting actors etc.? Should it be configurable? What would the defaults be etc.? Some ref shots.

Re: Optional Vanilla Water Shader

Posted: 30 Jun 2018, 19:25
by wareya
I mean, it's not completely necessary to use a cubemap, it just makes the math simpler, right?

The code for just reflecting terrain is relatively simple (with the caveat that you need to render statics when indoors), and yeah, it has a huge performance benefit over also reflecting statics and animated models.

Re: Optional Vanilla Water Shader

Posted: 30 Jun 2018, 19:32
by lysol
Why not have a similar type of menu as the current one? Except that instead of Water shader = True/False it could be a drop down menu where you could pick "Off/Old School/Modern" or something like that. Vanilla wouldn't really make sense since that presumes you are running Morrowind. Then you should be able to pick "Reflect terrain", "Reflect terrain + objects" and "Reflect all" too.

Re: Optional Vanilla Water Shader

Posted: 01 Jul 2018, 00:51
by DecumusScotti
Looks exactly like the vanilla MW shader to me. Impressive!

Re: Optional Vanilla Water Shader

Posted: 01 Jul 2018, 01:15
by AnyOldName3
That's because it's screenshots of the vanilla water shader. It's not something that can be cobbled together in a few hours (although the right person might be able to get close-ish).

Re: Optional Vanilla Water Shader

Posted: 01 Jul 2018, 16:12
by drummyfish
Yep, it's vanilla :)

Looking at the current water shader right now, it's a huge mess, might use some refactoring first. I might try to do it, seems like a good warmup.

Re: Optional Vanilla Water Shader

Posted: 06 Sep 2018, 21:07
by CaptainCosmotic
Will the vanilla water shader be a milestone for the 1.0?
I really hope so.
Open MW tries so hard to make a perfect copy of vanilla Morrowind and the water is somewhat ignored.

Re: Optional Vanilla Water Shader

Posted: 06 Sep 2018, 22:16
by lysol
CaptainCosmotic wrote:
06 Sep 2018, 21:07
Will the vanilla water shader be a milestone for the 1.0?
I really hope so.
Open MW tries so hard to make a perfect copy of vanilla Morrowind and the water is somewhat ignored.
If someone sends a pull request with that water shader, then sure. But I'd rather not wait one extra year for 1.0 just because of a not very nice looking water shader.

Re: Optional Vanilla Water Shader

Posted: 06 Sep 2018, 22:23
by AnyOldName3
The biggest things we don't have are mostly related to us not computing the normal map based on things touching the water. If we did that and used the computed normal map with the existing shader, it would beat both our current and the vanilla shader easily. Disabling the reflection and refraction of statics and actors with settings might go a chunk of the way towards attaining the performance of the vanilla shader, too.

Re: Optional Vanilla Water Shader

Posted: 08 Sep 2018, 14:41
by CaptainCosmotic
AnyOldName3 wrote:
06 Sep 2018, 22:23
The biggest things we don't have are mostly related to us not computing the normal map based on things touching the water. If we did that and used the computed normal map with the existing shader, it would beat both our current and the vanilla shader easily. Disabling the reflection and refraction of statics and actors with settings might go a chunk of the way towards attaining the performance of the vanilla shader, too.
I did not understand everything you said du to my restricted language (I am german) and du to my bad technical capabilities.
Did you say there ist an easy way implementing the basic look of the vanilla shader, but there would be no "rippling" effects?
I would take this in no time.

Can someone please open a pull requests for it on Git Lab? (I never did anything like that)
I would rather wait a while for 1.0 than seen it published, missing one of morrowinds most iconic graphical features.