Shared Texture Sampler

Is there one shared texture sampler per material or per level?

If I understand it correctly, its per material.

if this is per material, then I don’t see why it would be shared :slight_smile:

so you can put 128 textures in one material and itll be merged into one shared atlas.

so the other materials also pick into that pool of 128? In all there are 128 texture samplers shared among all materials using this mode right?

afaik its only per material, else it would need to load in a looooaaaaad of textures from materials that might not even be used in the current scene.

There is a misconception, that textures are atlased together to achieve higher limit. While this method of bypassing sampler limit is well-known in the past, it is not the case in UE4.

Shared sampler states has no relation to texture atlases, or materials in particular.
Shared samplers are initialized per scene for each type of shared sampler needed.

The new limit of 128 textures applies per-material and is not imposed by samplers.

Do note, that shared samplers do not work on all platforms. That is essentially the only thing you need to keep in mind, when using it.