How to fix the anti aliasing issue on babylon js

I am getting anti-aliasing issue on babylon js how to overcome this issue to render 3d model properly

Hi @gowtham and welcome to the community!

MSAA or FXAA instructions are available here:

https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/defaultRenderingPipeline#antialiasing

1 Like

Hi @inteja I am using the default rendering pipeline but i am getting aliased lines on edges how to overcome the aliased edges.

Are you able to setup a repro in the Playground? It will be easier to help.

I am using the default rendering pipeline but i am getting aliased lines on edges how to overcome the aliased edges.

@gowtham Same – did you find a solution?

Are you able to setup a repro in the Playground? Without more information, it’s hard to help (pipeline.samples = 4; should normally do it).

Here: Babylon.js Playground

As you can see, the edges look pretty bad, despite setting defaultPipeline.samples = 4:

scene.clearColor = new BABYLON.Color4(0, 0, 0, 0); you set alpha to 0 so the white backround is not rendered by babylon.js (it comes from the HTML page as another layer - not the rendering canvas) thus it can’t FXAA at all.

Set alpha to 1, color to white and it works:

Do you want to blend with the html layer? If so, you need to set the antialias parameter to true when creating the Engine.

4 Likes