# Any tips for getting above 90% antialiased output

**URL:** <https://forum.babylonjs.com/t/any-tips-for-getting-above-90-antialiased-output/19014>\
**Category:** Questions\
**Created:** [March 9, 2021, 8:55am UTC](https://forum.babylonjs.com/t/any-tips-for-getting-above-90-antialiased-output/19014 "2021-03-09T08:55:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayakannan](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jayakannan](https://forum.babylonjs.com/u/jayakannan)\
**Post date:** [March 9, 2021, 8:55am UTC](https://forum.babylonjs.com/t/any-tips-for-getting-above-90-antialiased-output/19014/1 "2021-03-09T08:55:30Z")

</div>

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

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

```

Then I enable fxaa using below code

```auto
defaultPipeline.fxaaEnabled = true;

```

And I am using msaa on event basis using below code

```auto
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.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [March 9, 2021, 10:57am UTC](https://forum.babylonjs.com/t/any-tips-for-getting-above-90-antialiased-output/19014/2 "2021-03-09T10:57:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jayakannan](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jayakannan](https://forum.babylonjs.com/u/jayakannan)\
**Post date:** [March 9, 2021, 11:16am UTC](https://forum.babylonjs.com/t/any-tips-for-getting-above-90-antialiased-output/19014/3 "2021-03-09T11:16:13Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [March 9, 2021, 2:31pm UTC](https://forum.babylonjs.com/t/any-tips-for-getting-above-90-antialiased-output/19014/4 "2021-03-09T14:31:36Z")

</div>

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).
