3D model looks fuzzy, texture sampler problem

The card 3D model further away from me, the more fuzzy, I use mipmap, how can make it looks always distinct same.


2 Likes

The autogenerated mipmap, lower texture resolution version is being activated for sure.

Can you post with and without mipmap enabled? What does it look like with filter-mode-linear for min and mag?

Have you yet tried a larger base texture size? Like 2x what it is now? That way the mipmap size is also larger (I assume).

Have you tried to apply a sharpen filter (in photoshop for example) to your base texture already?

You could also try applying a sharpen post processing shader to your render target too.

By the way, your game is looking great still. Congratulations!

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

I love you ! That is great ! It works ! Improved a lot. I set it to -1.0.

5 Likes

If the view dir is perpendicular to the front face of the card, the card will looks clear, does it matter with light ?

1 Like

Super glad you are getting a better result now!

It might matter, you would have to test. If there are other issues post screenshots and I may be able to suggest something.

2 Likes