Fuzzy DrawLine() in mojo if thickness > 1

About Monkey 2 Forums Monkey 2 Development Fuzzy DrawLine() in mojo if thickness > 1

This topic contains 3 replies, has 3 voices, and was last updated by  arpie 1 year, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5254

    arpie
    Participant

    Mark,

    It looks like this is by design… but it seems unneccessary.  I there a reason that mojo’s DrawLine() actually draws four overlapping lines slightly offset from each other to create a crude anti-aliasing effect when the line thickness is greater than 1 and the canvas BlendMode is anything but Opaque?  None of the other DrawX methods seem to have this quirk (I would have expected DrawPoint to do something similar, for example).  Would it be sensible to introduce an ‘AntiAlias’ flag which switches on this sort of behaviour on all drawing methods?

    On a related note, is there a ‘correct’ way to perform antialiasing of all primitive drawing commands in mojo (or GLES)?  The only way I can think of is drawing to a larger-than-screen image buffer then scaling it down before plotting to screen but gut feeling suggests this will be very slow.

    Russell

    #5255

    Mark Sibly
    Keymaster

    This is just an (incomplete) attempt to make thick lines look a bit nicer. Ultimately, I’d like to store line params in texcoords and let the shader do this but we;re not there yet, ditto with points, ie: it’s WIP.

    Max glLineWidth differs on different graphics cards, so can’t be used reliably so mojo draws an ‘oriented’ rect if width>1. I could add an ‘AnitaliasedLiesEnabled’ property, but I’d rather wait until shaders can deal with this.

    There is no FSAA yet but it will happen.

    #6344

    Diffrenzy
    Keymaster

    Currently working on my SVG2Image loader. The only thing missing is antialasing.

    Do you have an ETA on that  FSAA? 😀

    Also I found http://developer.download.nvidia.com/assets/gamedev/files/sdk/11/FXAA_WhitePaper.pdf that seems to be something that can be done in a shader?

    #11998

    arpie
    Participant

    I haven’t really been following the shaders development in much detail but thought I might ask… are they now advanced enough to able to deal with FSAA?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.