Material Layering and 4.18

Hi everyone,

we are a team of students and we are starting a project. I decided to use some material layering for our environment and props. I found a lot of ressources about it (mostly about Paragon) and it’s working pretty well but I have an issue with shader complexity.

In this video (, Zak Parrish explain that they keep the shader instructions between 150-200 for the environment in Paragon. Our game is an third person action game so I think it’s a good reference to start. On the forums, I found some people saying that they have a 4 layer material, with shader instructions between 70 - 120.

My problem is that with only 4 very simple layers (take a look at the images), the intruction count is at 188 so it’s in the range but I can’t add any fancy calculation to the shader. Any function like world aligned texture or parallax makes the instructions go above 200.

I noticed that for an empty material, the shader instructions is already at 99 in 4.18 compare to 78 on 4.16. Do I have to take this in account and reduce the complexity of my shaders or is it ok to leave everything like this and just have 20 instruction more on every shader. (I’m talking for Surface Opaque). How can people have shaders below 100 instructions ?

I also read that a parameter counts as one instruction but only at compiling time not at runtime. So it increases instruction count and compiling time but not performances at runtime.

So my questions are :

  1. Is 188 instructions high knowing that we start at 99 in 4.18 ? We are targeting high end PCs (It should run on PC with a 1080 and 32Go Ram).

  2. My material is mostly composed of a lot of parameters, some texture lookup and very simple maths, is it expensive ?

  3. Is what I said about parameters true ?

Thanks :slight_smile: