filament icon indicating copy to clipboard operation
filament copied to clipboard

Metal: virtualize samplers to support the minimum of 31 textures in shaders

Open pixelflinger opened this issue 3 years ago • 0 comments

All version of metal support at least 31 texture images, but only a maximum of 16 samplers. Currently the metal backend as a 1:1 mapping between these, and as such supports only 16 textures in shaders.

We want to cache/virtualize samplers so that up to 31 textures can be used.

For now, it'll be okay to assume that we won't encounter more than 16 different samplers per draw call.

pixelflinger avatar Jul 14 '22 17:07 pixelflinger