Archive 17/01/2023.

[SOLVED]How to set MSAA?

imxqliu

In the sample multiple viewports, I find urho use postprocess Fxaa to AntiAliasing, while I want to use Msaa to get a high quality render result such as ogre’samples, any suggestion?
Thanks.

thebluefish

Multisampling is handled by Graphics, not by shader. You can enable this in your engine initialization as so:

engineParameters_["Multisample"] = 2;

Alternatively, you can use the following to set it on the fly:

// (int width, int height, bool fullscreen, bool borderless, bool resizable, bool vsync, bool tripleBuffer, int multiSample);

auto graphics = GetSubsystem<Urho3D::Graphics>();

graphics->SetMode(graphics->GetWidth(), graphics->GetHeight(), graphics->GetFullscreen(), graphics->GetBorderless(), graphics->GetResizable(), graphics->GetVSync(), graphics->GetTripleBuffer(), true);
imxqliu

thanks, now it’s works well.