3D model looks fuzzy, texture sampler problem

I learned something new today while searching for a solution which I hope will help to at least partially solve this.

In fragment shaders usually we do

texture2D(tex0, uv)

But there is an optional third parameter, the bias of the mipmap, which can make mipmaps sharper. This value is a float.

texture2D(tex0, uv, mipmapbias)

Make this a number higher than 0 to be more blurry and lower than 0 to be sharper. So -1.5 here would make this sharper.

This number should be adjusted per project. Ranges from -0.5 to -1.0 may be better. Maybe someone else can explain it more completely, but it seems to work at least in my tests. It works for sprites and other materials too.

And positive numbers can make something look blurry for cheap too!

2 Likes