I recently ran into a small problem, whenever I add additional material functions to the Landscape master material (The one applied on the landscape), the shaders dont compile and the default grey texture shows up. As im quite new to Unreal Engine 4, I followed a tutorial on how to import slope map through world machine to unreal, and it worked quite well. I will attach a screenshot of my landscape master material here. Seems more of a hardware limitation to me, if thats the cause is there any way around? Thanks.
R7 360 2GB
8 GB RAM
Using version 4.15.0
It’s probably because you have too many textureSamples in your material.
You are limited to 16 (a DirectX limitation, not specifically an unreal one), but some of them are already reserved - 2 for lightmass, 1 for a specular cubemap. If you have debuffer decals turned in, I think that takes a slot, too.
You’re therefore realistically limited to 12 or 13, depending on what features you have enabled.
One solution is to turn your sampleTexture to ‘shared-wrap’, which won’t take up a sampler slot. You can have up to 128 of these.
Thanks man, that worked perfectly. I changed most of my texture samples to shared-wrap, but I have a small question. Is there any downside of switching this to shared-wrap? Can you quickly summarize the difference between ‘shared-wrap’ and ‘from texture assets’?
I’ve been wondering about that - to be honest, I don’t know. I assume there’s some downside, otherwise it would be applied as standard and there wouldn’t be a difference.
I know you are limited to 128 of them per project. Maybe that’s an issue on really large games?
Be good to get an answer from someone who actually knows what the code is doing.