Automatically Turn Off Water Shader When No Water Is Visible

Feedback on past, current, and future development.
Post Reply
Iskuss
Posts: 4
Joined: 02 Apr 2018, 21:46

Automatically Turn Off Water Shader When No Water Is Visible

Post by Iskuss »

Turns off the water shader automatically when the game detects that the player is in a cell with no terrain below z = 0, and also when cells within the player's view distance have no terrain below 0.

I think this would be a worthwhile optimization. In the worse case scenario where the player is in a cell with water, they would have no improvement in framerate, and they would have to bear the load of the check, but there are many areas of the base game and modded landmasses such as Tamriel Rebuilt and Skyrim Home of the Nords where this is not the case. In these areas, there would be an increase in performance. Users with high view distance might even opt to keep this option turned off because they can usually see water, but users who must use lower view distances because of having lower end PCs would benefit the most from this feature, if it were made.
User avatar
AnyOldName3
Posts: 2667
Joined: 26 Nov 2015, 03:25

Re: Automatically Turn Off Water Shader When No Water Is Visible

Post by AnyOldName3 »

It won't help at all. The water is just a single plane, so four vertices, so basically no work for the vertex shader and rasteriser. As it's behind other things when you can't see it, the fragment shader won't get called at all, so causes basically no work either.
Chris
Posts: 1625
Joined: 04 Sep 2011, 08:33

Re: Automatically Turn Off Water Shader When No Water Is Visible

Post by Chris »

AnyOldName3 wrote: 03 Apr 2018, 13:17 It won't help at all. The water is just a single plane, so four vertices, so basically no work for the vertex shader and rasteriser. As it's behind other things when you can't see it, the fragment shader won't get called at all, so causes basically no work either.
It can avoid having to render the reflection. Not really the shader itself, but if we know reflections can't be seen because water isn't visible, we don't have to render it.

I have to wonder about the practical utility of such an option, though. Especially outside, more often than not you'll be near where water can be seen, even if the camera can't directly see it (it would have to use rough approximations, as actually detecting if any visible pixel renders water would probably be more costly than skipping reflections). And if rendering the reflections has that much of a performance impact, it'll just create more cases of people complaining 'when I go to XYZ, performance drops. It fixes itself when I move away.' If it's that much of an issue, it would probably be better to turn off water shaders in the options, or find a way to do cheaper reflections.
Post Reply