This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+1 vote

Is it possible to apply a bilinear filter effect to the 2d scene or what the camera displays?
Reimport filter doesn't seem to be a solution because at 100% zoom or 1.0 scale, it shows a sharp clear pixel and also it looks a bit more than trilinear(too blurry) at different zoom.

Is there a way to implement this bilinear filter, just to smooth /blur all 2d pixels displayed on the camera?

in Engine by (39 points)

1 Answer

–1 vote

Just import your textures with filter on. I think that's even the default, so not sure why you would get sharp pixels instead. If you see any sprite being pixelated when you zoom, it must be due to its texture not having the filter on (also I think Godot's filter is bilinear).

If what you want is actual blur, then you could have a look at screen-reading shaders to code a post-process shader that applies to the whole screen:

by (29,510 points)

Thank you for the response, It is very helpful and i learn many new things!
Is it possible to handle the reimport textures with filter on/off during runtime via script?

For example, i have an in-game option with a boolean bilinear filter... or perhaps if is it inefficient, is taking the route of screen reading shader more logical?

Sprite pixel at zoom 100% or 50% looks great, but at 75% is when the issue of distorted pixel shows. Bilinear resolves that although at the cost of blurriness, which i am okay with.
Problem with Bilinear filter is, it works at all zoom level except 100% so i can either hack it by setting zoom at 99% or 101% to apply the blur effect.

Looking forward to your thoughts. Thanks again!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.