landscape material + world calculations

Hi all,

Just curious if anyone else has experienced something similar to this.

I decided to add a rising/waning tide to my project. All good, it worked well.

Then I realized that my landscape’s wet area wasn’t shifting so I modified the material to make this happen.

Nothing extremely fancy.
Absolute world position mask G - tide level + offset (above water).
This is then multiplied by a really small number to fade it instead of having a hard line, inverted with a 1- and used as the alpha to a Lerp where the same textures are on 0, and the same texture multiplied by a hue is into 1.

It works beautifully, but I lost 20fps. I’m trying to figure out why the performance is so bad from just this very simple set of instructions.

Changing the falloff multiplication number doesn’t actually change much of anything, removing it altogether seems to also have no effect.

The landscape material is made up of functions at the moment, I set it to use virtual textures already and it’s not exactly helping at all, if anything I think the FPS got lower since i implemented it.

Because virtual textures can’t be used as tessellation a copy (more samples) are used for the virtual texturing portion.

The material functions are your basic set up with 3 distances and a merge. Nothing complicated and it used to benchmark at 120fps when I first created it (not virtual textured) about 3 months ago.
(Ofc there is also a macro texturing to hide the texture patterns going on, this was also part of the initial benchmark).

I’m testing different things to see what may be causing this (mpc could be the issue too). Just wondering if anyone has seen anything similar - or managed to develop a material that performs well while adapting on a landscape.

This is probably related btw. I’m having issues after retopologizing part of the landscape. You can clearly see that the landscape material is shaded differently - while that’s expected, it remains this way even after building lights. Painting over it makes no change. I have seriously never seen it behave this way in 4.22…

I get this even less. The kite demo runs at twice the FPS/MS but has a ton of the same stuff


(divide instead of multiply by .001 can’t make that much of a difference).

I’m just going to try and convert the textures to VT and see if that’s what the issue actually is.

Ok, well, Just enabling texture streaming dumped down from 80fps to below 60fps, and I haven’t even modified the textures/materials… I’m guessing Virtual-texturing is just too new to be any use…