Moving Material nodes increases instruction/sampler count

4.11.2 Launcher version (Version: 4.11.2-2946394+++UE4+Release-4.11)

Steps to reproduce:

  1. Create a new blank project for Desktop / Console and Maximum quality, optionally with Starter Content (not mobile!)
  2. In case the project is really blank, add the Starter Content (not the mobile one)
  3. Open up StarterContent/Materials/M_Ceramic_Tile_Checker
  4. Enable both Stats and Mobile Stats, wait for the shaders to compile.
  5. Note down the results
  6. Pick a random Node (such as the material node M_Ceramic_Tile_Checker itself) and move it to the right/left
  7. Save/Apply the changes and look at the Stats/Mobile Stats again

For me, I get the following results directly after opening the material:

Info Base pass shader with static lighting: 81 instructions
Info Base pass shader with only dynamic lighting: 52 instructions
Info Vertex shader: 31 instructions
Info Texture samplers: 6/16
Info Mobile base pass shader with only dynamic lighting (HDR): 102 instructions
Info Mobile base pass vertex shader (HDR): 75 instructions
Info Mobile texture samplers: 7/8

After moving the node, I get the following:

Info Base pass shader with static lighting: 109 instructions
Info Base pass shader with only dynamic lighting: 79 instructions
Info Vertex shader: 31 instructions
Info Texture samplers: 8/16
Info Mobile base pass shader with only dynamic lighting (HDR): 139 instructions
Info Mobile base pass vertex shader (HDR): 75 instructions
Info Mobile texture samplers: 8/8

Pretty much all the stats jumped up (except for the vertex shader), for no apparent reason.

Why is this a problem? I created another Report over here for the promoted branch where this causes the Mobile texture samplers limit to be exceeded (which leads to the Material to be replaced by the Default Material unless being changed to decrease the count, using Unlit model or forcing Fully Rough for example) for having an extra sampler that I don’t know yet where it comes from (jumping from 8/8 to 9/8).

Hey BhaaL,

I just tested the issue you are reporting and was not able to reproduce the results. I attempted a couple different materials and they all produced the same results. Since this issue is appearing easily for you, would you mind providing me with your ‘dxdiag’ so I can take a look at your system specs?

Let me know if you have further questions or need additional assistance.

Cheers,

Hi Andrew,
there you go: dxdiag.txt

I recently upgraded to an i7 6700k and at this point don’t have a dedicated GPU, but I’d be surprised if the integrated Intel HD 530 affects shader generation for Android (which is what seems to happen down the line; and even causes compilation to fail on promoted as noted in my other report).

In case it helps, thats what I see: Google Drive: Sign-in

Let me know if there’s anything else I can help with.

Thanks,

BhaaL

Wow, thank you for the video example as it gave me a better indication of how to reproduce this issue. With that said, I was curious to see how far back the rabbit hole went for this issue, and I was able to get it to occur from 4.9.2 up to our most recent 4.12 preview release!

We appreciate you reporting this issue and bringing it to our attention as I am sure this issue has affected users without them even knowing it. The issue has now been reported as (UE-30017). Once it has been fixed, it will be integrated into an upcoming full release or hotfix and added to the list of known issues.

Let me know if you have further questions or need additional assistance.

Thank you,

Glad I could help there! I only noticed since promoted made the Mobile build go over the maximum possible count of 8 samplers after changing a single material (and and probably only because it seems to use up an extra sampler there too).

Sigh… 4.18.2 here and still experiencing this issue. Texture Samplers used only 8 but Mobile Texture Samplers: 9. There’s no other hidden texture that adds 1 to mobile texture sampler.