MxEngine
MxEngine copied to clipboard
Issue: Bad antialiasing algorithm
🦆
hi can you please me in this ,actually I am not getting this issue
Hey. If you look at the green stripe, you can notice sharp dots/pixels, which should be smoother
To make it clear what we have in engine for now:
no antialiasing algorithm enabled - sharp edges
FXAA enabled - too blurry textures
There is also a third option (which is actually the best) - use SSAA by manually increasing camera render texture. It is not implemented in engine as separate method, but can be coded in just a few lines:
Event::AddEventListener<WindowResizeEvent>("CameraSSAA",
[controller](WindowResizeEvent& e) mutable
{
constexpr size_t scaleSSAA = 2;
controller->ResizeRenderTexture(e.New.x * scaleSSAA, e.New.y * scaleSSAA);
});
// comment the line below in your code, as it resizes render texture to window size
// controller->ListenWindowResizeEvent();
SSAA 2x enabled - much less visible deffects.
It is quite a good antialiasing algorithm, but it requires much more pixel processing power, so I can not recommend using it for fullscreen applications.
Hey. If you look at the green stripe, you can notice sharp dots/pixels, which should be smoother
OK I understood thanks