filament
filament copied to clipboard
Metal: virtualize samplers to support the minimum of 31 textures in shaders
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.