Godot blurry edges

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nv7-GitHub

I have noticed that edges on cubes and other things in Godot have blurry edges. I have turned Antialiasing to 16x, but they are still blurry, especially compared to a similar thing in Unity, with even lower resolution was able to maintain crisp edges.
Screenshot of Godot:
Screenshot of Unity:

:bust_in_silhouette: Reply From: Calinou

Edit: I noticed you were talking about cube edges, not shadow edges. Still, I’ll keep the old answer below for posterity.

When you enable MSAA, you agree to give up some crispness to get smoother edges. The Unity screenshot you posted has MSAA disabled. MSAA is still the best kind of antialiasing you can get for polygon edges (it won’t introduce additional blur like FXAA or SMAA).

Antialiasing won’t affect shadow quality as MSAA only affects polygon edges.

To improve shadow quality, you can change the shadow filter to PCF13 (at the cost of performance). Also, when you use the GLES2 renderer, shadows will always use nearest-neighbor filtering. This is due to a GLES2 limitation; it’s possible to lift that restriction using a hack (not implemented in Godot), but that impacts performance even more.

To make shadow peter panning less noticeable, decrease your DirectionalLight’s bias/normal bias values the most you can without introducing shadow acne.

Godot 4.0’s new Vulkan renderer will feature hugely improved shadows.

Thanks for the answer, but I wasn’t trying to make the shadows crisper. I was trying to make the edges less blurry looking on the cube itself. There are these opaque squares on the edge instead of nice crisp edges, like unity.

Nv7-GitHub | 2020-07-09 16:01

I found the answer - it was the Allow Hidpi setting.

Nv7-GitHub | 2020-07-24 18:50