Download

What Affects the SM5 Texture Limit (Besides Actual Textures)?

Hey guys, just a quick question. What affects the SM5 texture limit (not including actual textures)?

I have a material with 7 textures and am over the 16 texture limit, so in reality I can only have 6 textures. Does anyone know what else can contribute to the max texture count? This is a translucent tessellated material with custom displacement.

I have a SceneTexture node that gets the CustomDepth buffer as well (so 6 textures + the SceneTexture), are there any other operations that could also be affecting it?

Some info here: 12 texture samplers - why there is no more samplers ? - UE4 AnswerHub

TLM_Surface alone eats up 4 samplers.

Wow… OK well that makes sense now, I had no idea it used up so many of them for TLM_Surface.

Well I need it to be TLM_Surface, translucent, dynamically lit material so I guess there’s no way around it, I hope they increase the limit to 32 soon, they have been mentioning it recently.

Thanks Jacky! BTW I’m planning to post the main material later today, still some issues to fix (buoyancy mainly) but I’ve held onto this long enough, might turn it into a community project for others to add to it as well, will update my thread with a download soon! :slight_smile:

Awesome! :slight_smile:

There are a bunch of built in features that use texture samplers, mostly static lighting stuff but translucency also has a bunch since all translucent lighting has to be forward (in the same shader).

In the upcoming 4.6, on PC D3D and consoles, you will be able to use up to 128 unique textures. This is made possible by picking shared samplers per TextureSample node instead of always using the UTexture asset settings.

Oh wow that’s great news! Thank you Daniel, I will just leave the samples in the material disconnected until I get 4.6. 128 texture samples sounds awesome, maybe even a little bit too extreme! I doubt we will be hitting that limit for quite some time… :slight_smile:

I have been waiting for this for years. <3

Yes it is quite overdue =) Unfortunately there is only so much time in a day. Better late than never right?

Holy **** I’ve waited for this since the dawn of time! Is there any drawback from having more samples rather than atlasing textures together into the same sheet? Asking because I’ve put together my landscape material with 32 textures atlased into 3 sheets (base color, normal map, Rough, Height, AO).

When you atlas, there will be artifacts in the mip maps (neighboring textures blend in). Also the atlased texture has to be streamed as a whole regardless of what is used, and all textures in the atlas are forced to the same format. But otherwise, no difference that I can think of.

I’ve gotten rid of both the bleeding caused by mip maps and the artifacts caused by using the frac node to cut up the atlas but I guess that’s more performance heavy than just using separate textures so I think I’m better off importing them as single sheets later. Thanks!

If we had the option to generate the mip maps with an external tool, half the problem of texture atlas’ would be gone. Using nearest in mip map generation helps, but leaves you with very pixelated mips. I still don’t understand why we do not have an option to import our own mips. This is a perfect example for why we need it! Yes, the new feature for 128 texture samples will be great, but it would not surprise me if there are caveats / strengths to each method, in comparison to each other.

Is this related to using Texture Arrays? I may be mixing up the terms, but I recall there being a feature in the latest DirectX-versions which allows you to fetch texture samples from an array, allowing for a lot more texture samples to be used?

Great work anyhow! I will really appreciate the new support for many texture samples. :slight_smile:

You can already do this. After you import your texture, go to the details and make sure MipGenSettings is set to Leave Existing Mips and this will use the mips that were already in the texture.

What material settings save texture samples? I’m trying to make a landscape material that will always be dynamically lit. I seems like statically lit uses more samples but I’m not 100% sure what the best setup would be.

Well, I went from being totally concerned about failing to optimize with tons of individual maps to… absolutely no concern at all :slight_smile:

Thanks, Daniel!

Oh, I completely missed the DDS-option in import settings. I guess I’m still stuck in the UE3/UDK mentality. Thanks for the headsup. :slight_smile: