Mobile landscape layer limited to 2 per segment?

I have been trying to get my landscape running on Android but looks like it has issues with blending more than 2 layers. I am targetting ES3.1 and Vulkan devices.
I am using simple weight blending. I ran the project on Nexus 6P using both ES3.1 and Vulkan rendering and the results were the same as in the High-end rendering preview in the editor.
This is my sample with expected output:

Here is the actual in editor output in ES3.1 rendering:

And here is my material setup:

Please tell me if I am doing something wrong or there truly is a limitation on number of layers. I am struggling with this for a week now.
Thanks in advance. :slight_smile:

Hi Brohan11,

Mobile landscape is limited to 3 layers in each landscape component, because the weights for two layers are packed into two texture channels (and the 3rd implied) of the normal map texture. This was done to save texture samplers which are a very scarce resource on ES2 with only 8 available. This makes less sense with ES3.1/Vulkan where there are 16 texture samplers available.

Can you confirm exactly 3 layers work correctly?

  • Jack

Thanks Jack for confirming this. Yes, the setup works for 3 layers correctly. And I guess you are right, it does not make sense for high-end devices since tiled landscapes will generally use lesser layers.
This should be added to the documentation, although I might have missed it, not sure.
Is this something that could be changed in the future?

Ah makes sense. I guess you could make an exclusive mode for high end devices that does not supposed ES2 and only has ES3.1/ Vulkan support.
Just a suggestion.

I’ve added a feature request (UE-41902), but I’m not sure when or if we’ll get to it.

One complication is what to do when packaging for both ES2 and ES3.1. The source landscape texture data needs to be transformed and packed when packaging for ES2, but if ES3.1 doesn’t require it then we would need to support both packed and unpacked mode simultaneously. I guess we could always pack when less than 4 layers and don’t pack when 4 or more layers.


We use UE4.21 and we have met similar issue on iOS preview (ES3.1). Is the limitation still exists?

I mean, could we use 4 or more layers per component for ES3.1 device?
(In order words, is the request UE-41902 being implemented?)

In the level which we are working on, it seems that sometimes 4 layers work and sometimes not…

oops, I have found that part of the answer in the release note of UE 4.20…

My question would be, how many layers are supported for ES3.1?

In the level which we are working on, it seems that sometimes 4 layers work and sometimes not

As for this, we may consider to submit a bug report later…