Layer blend node broken in mobile shader?

Been stuck a LONG time.
After several trouble shootings and redos I have gotten down to something pretty simple

I have a single green/brown grass texture 64x64
Connected into a make materials attribute node.
Into a “layers blend” node
Into the material output set to use the material attributes.

It renders in the PC shaders 5 or 4.
But will not display in the mobile shaders.

I have a more complex landscape material I will eventually use but, it wouldn’t render so I created a small landscape and went through. Everything works fine displaying until I put the layer blend node in there.

I have tried setting it to alpha, height and weight.
I set the auto weights to different numbers (currently 1)

So it appears the layer blend node blocks it during mobile preview (I have tried the high end and Android)

If anyone can share ideas on what to look at next and/or screen shots of settings they have used to make it work I would much appreciate it. I have literally been stuck months

I’m in the opposite situation. My project works on high end mobile preview but not on sm5. I’ve also located the problem “within layerblend”, shader doc indicates that “there is no texture input”. the version is also 4.20.

wtf is wrong with this layerblend node

I dont know. I was having the same trouble right before 4.20 in 4.19

I did have a lot of things not quite right being the first project, texture sizes and numbers.
But I know with my current test of a single 64x64 texture that I went node by node the problem happens when I add in the layer blend.

When I get a chance (today is busy so probably tomorrow) at home I’ll take bunch screen shots and post them.
Maybe if you do too we can figure out what the two of us are doing different and work it out?

yeah, we do should work together. Those landscape materials giving me trouble, were imported from an v4.19 project… another similarity.

But the funny thing is: It works in v4.19, it’s not black. So, there might be sth different between 4.19 and 4.20. Since I’m not an experienced player with unreal, this problem is really giving me hell.

I’m guessing, there is sth wrong with the shader code generation, maybe sth cached for “high end moble” in my case. cause I look into RenderDoc, there is no texture unit of any of those terrain textures. there is no input at all. But I can’t find the exact line of shader code which is responsible for this.

may the force be with you~

left side: code generated with layerblend
right side: code generated with my custom blend

you can see: there is no texture sampling code on the left side!
the terrain textures are not sampled at all, so it’s black …

upper: layerblend
lower: my custom blend

I just need to figure out which vertex attribute did unreal used as blend weight for layerblending.

Oh…i have no idea what most o

f you lines of stuff is.
I can’t code. I’ve gone several times to pick it up but, it just doesnt really stick very well. I can do the easy stuff then suddenly I dont understand a thing.

Here is my set up right now i’m working with. Doesn’t get much easier than that. A single 64x64 (so square and power of 2) testure
Set to fully rough
I have it set to wrap right now. But have tried the others just to be sure.
It is set to fully rough.
(i’ve also tried unlit)

Unless something has happened I have all the settings turned down as low as I could. Where several of the shaders used for lighting and stuff are disabled…
Entire level is just a 4x4 landscape set with 2 sections per.
A skylight, and atmosphere fog (in shader 5 the black was annoying me), a cube, and a point light.
That way I could make sure the lighting was working, and all that (as I’ve had it show up black on black too)

The mobile stats button is now gone. And i was playing with the stats. Got a warning I need an offline compiler. I will have to look into this and see if it effects anything.

This is new. I never saw it on 4.19 and it’s where it used to say mobile stats.
I might try downloading some of these offline compilers it speaks of. If it turns out that I just dont even have the shaders in the first place…

as an update, I found sth wierd during the shader generation. I’m comparing “sm5 compilation” with “high end mobile compilation”. It’ gonna take me some time and it’s late now(00:27). I’m gonna continue the dig in tomorrow. Wish me luck. Anything I found shall be shared with you for sure. :slight_smile:

good luck with that, might sovle your problem :slight_smile:

Turns out I did have the shaders, installed to proper file and everything. Seems when I updated just some project settings may have gotten bit tweeked.
I got the nice “this is already installed at…” Message.

So today will be going back through project settings and making sure they are set right.

Everything on stats shows good though. Shaders are bit high for one texture, so I presume some of the lighting ones and stuff I had turned off are back on.
4/8 used for one image.

No errors. Nothing in logs.
I just don’t know…

Mine was the same.
I already had the one from documents installed.
I just had to reference the .exe there to get it turned back on.
Having gotten that months ago I had just completely forgotten and probably the update messed with some of my settings.

Here is the one from the documents:

this is how my material editor looks

so, your problem is gone now? if so? congratuations!

Mine, on the other hand, more complicated. I found the direct reason but not the way to sovle it…

When I’m done, I’m gonna post it here

Nope.
Still doesn’t compile. It actually made it more frustrating.
Having the stats say that everything is OKAY and it STILL not work is more upsetting

Sorry,for the delay. I solved mine the day before yesterday.

The problem on my side is: When I migrated those landscape from the original 4.19 project to 4.20 project, parameters(for sm5) are lost for those material instances. the hlsltranslator finds no params for it to generate sampler code. so no texture is sampled and those landscapes are black.

The difficulty which took me so much time is: I don’t know how to generate them. They were handled during the editing proccess, I got stocked.

And finally I just took a wild guess “may be I make an new instance of the broken material on sm5 shall force the editor to generate those params for me”. It worked. WTF!

do you have programmer friend? your problem is very much related to your develp enviroment. Maybe ask him/her to have a look at your env? offer him/her a beer? :slight_smile:

My friends can barely tie their shoes.
I spent 20 minutes today helping one post a photo to Facebook.

I have a few I chat with on discord as “friends”
They have looked at what I have and can’t come up with anything wrong.
One has several small endless runners and stuff on Google play even.
Swapped all the settings to same. They use and nothing.

Something somewhere… Ahhhhh

have you tried to compile the unreal engine editor your self? It’s very easy and “it downloads the dependencies automaticly”. May solve your problem.

only thing you need is visual studio 2017, it’s free.

after you download the unreal src code, follow those pics below

unreal src code can be downloaded with those instructions

this chinese version, but you can modify zh-CN to en to get english version

I shall be around :slight_smile: