Any tips for getting above 90% antialiased output

Hi all,
I am using defaultrenderingpipeline using below lines of script

var defaultPipeline = new BABYLON.DefaultRenderingPipeline(
      'default',
      true,
      scene,
      [camera]
    );

Then I enable fxaa using below code

defaultPipeline.fxaaEnabled = true;

And I am using msaa on event basis using below code

camera.onViewMatrixChangedObservable.add(() => {
      defaultPipeline.samples = 1;
    });

    scene.onBeforeRenderObservable.add(() => {
      defaultPipeline.samples =4;
    });

Using these AA methods, the scene is partially antialiased. But still there are some aliasing effects. Any other tips to get rid-off it.

You can try to raise the value of the MSAA samples. Also, you can try to enable anisotropic filtering on your textures in case your aliasing problems come from there.

A repro PG would definitely help, though.

1 Like

Sorry @Evgeni_Popov . The models used in the project can’t be share. So I couldn’t make the PG with the same models. Can you please say any other tips and tricks to handle aliasing. And one more thing I need to know, is there any relation between camera projection matrix and antialiasing?

No, there’s no relationship between the projection matrix and antialiasing.

Another thing you can try is to use engine.setHardwareScalingLevel(0.5) to render at twice the resolution (super sampling).