Open AlexvZyl opened 2 years ago
@Cullen-Enerdyne If you are wondering why the text is not smooth.
This happens due to the way MSAA is implemented with FBO's. Blitting a texture from a multisampled one to a non multisampled one does not allow the use of GL_LINEAR
and instead uses GL_NEAREST
. This is temporarily improved by increasing the MSAA level to 32. This is a very large number and will impact performance.
I think we will have to implement a different AA method.
@AlexEnerdyne, have you looked at FXAA to see how much it would take to implement that?
Are you sure this isn't an issue caused by downsampling? I know gaussian filters and the likes are usually used when downsampling textures.
Yes, it basically downsamples when rendering to the screen. But I have an idea to bypass it. MSAA is the simplest and least efficient of the AA methods, so it was anyway a temporary solution.
Will look at FXAA.
A possible solution to this problem, is instead of blitting the MSAA texture to the render texture attachment, you render the MSAA texture onto a quad in the render texture attachment. This will actually improve performance as well! (It seems like blitting is an expensive operation)
It does not seem like #90 helped at all. It could be that I am not sampling correctly in the shader, causing it to behave like GL_NEAREST.
MSAA x8, rendering as texture.
MSAA x8, blitting.
MSAA x16, rendering as texture.
MSAA x16, blitting.
The text is looking much better on my screen at low zoom levels.
The text is looking much better on my screen at low zoom levels.
That is due to the higher MSAA value, not improved rendering :(
MSAA has been removed. We should implement something like FXAA/TSAA.
Reopening - this is not an MSAA issue, but rather MSDF (I think).
This was fixed with #337? Will check when we add MSAA again.
Pretty sure this has something to do with how the MSAA is being resolved and how we render MSDF.
@Cullen-Enerdyne I think this issue deserves the label.
When zooming out in the OpenGL scene the edges of blended entities get jagged edges. This is not a MSAA issue, but I am pretty sure it has something to do with blending,
Smooth text:
Jagged when zoomed out: