[Solved] How can I get rid of blurry textures in Metal?


In your texture sample call (in the shader), you need to set your magnification filter to ‘nearest’, instead of ‘linear’, like so (assuming your sampler is declared inline inside your shader):

constexpr sampler textureSampler (mag_filter::nearest, // <-- Set this to 'nearest' if you don't want any filtering on magnification
                                  min_filter::nearest);

// Sample the texture to obtain a color
const half4 colorSample = colorTexture.sample(textureSampler, in.textureCoordinate);

2

solved How can I get rid of blurry textures in Metal?