vahith

Avoiding jagged lines in cube

Recommended Posts

To antialias your scene you can use  :

yourCamera.attachPostProcess(new BABYLON.FxaaPostProcess("fxaa", 1.0, yourCamera, BABYLON.Texture.BILINEAR_SAMPLINGMODE, engine, false));

with BILINEAR_SAMPLINGMODE, TRILINEAR_SAMPLINGMODE or NEAREST_SAMPLINGMODE

Share this post


Link to post
Share on other sites

Hmm, that's strange.

If I deactivate antialias filter in the playgrounds you posted I have no "jagged" problem. What browser are you using, and what environnement PC, mac, mobile phone ?

Or maybe I don't get what you mean exactly by jagged edges...

 

(BTW, in this case antialias filter is not needed, in fact edges are even uglier with antialias activated here)

Share this post


Link to post
Share on other sites

hi vousk;
i am using Firefox and chrome,i tried in mac and windows also.. if you see my playground. the jagged edges are visible in cube when i am rotating. i want to avoid the jagged edges...

Share this post


Link to post
Share on other sites

Hi,

 

I don't think you can get much better edge smoothing that the default one without aliasing: http://www.babylonjs-playground.com/#1JSJOX#4

 

You can try rendering the scene to a larger texture  (2 times in this example) and then applying the FXAA effect, like so: http://www.babylonjs-playground.com/#1JSJOX#5

But this is going to be costly...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.