Antialiasing on Native

So, im looking into Heaps, having not really used it before i have to say its got a lot of cool features. One thing puzzles me - seems there is no Antialiasing on native? With HTML5 it seems that Engine.ANTIALIASING works - but this does nothing for SDL / DirectX on HL…?

Is there some specific reason there isnt any antialising? Ofcourse its possible to use FXAA or maybe even TAA in a deferred 3d pipeline… But for basic 2D stuff… having jagged graphics is not something that works well… im hoping there is a way to fix this… (Without forking Hashlink :slight_smile: )

Anyone?

1 Like

Since there was no help to get here, i built a custom version of hlsdl myself.

And there you go : MSAA on HL.

unknown

Now isnt that much nicer? :sunglasses:

1 Like

Hey, there. Since you answered this yourself and I’m no grahpics guy at all I was still a bit confused that we actually don’t have any hlsdl documentation etc. :open_mouth: :grey_question: Or that’s normal because it just wraps SDL and one has to understand working with SDL itself, right…

I’m new to C++ and now looked into SDL for 2D games. So I can only feel like there is an answer when combining one of these links here:

  1. Full Screen Anti-Aliasing - SDL Development - Simple Directmedia Layer
  2. [SDL2] - Apply Anti-Aliasing To Entire Screen? - #2 by JeZxLee - SDL Development - Simple Directmedia Layer

…with the hlsdl code


so this is what I would find…

For 2. I find that there is

  • /* HintMode */ and /* HintTarget */ in GL.hx
  • and in SDL.hx there is public static function setHint, hintValue`,
  • and SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
    in sdl.c → maybe there one could just add the line SDL_SetHint( SDL_HINT_RENDER_SCALE_QUALITY, “1” ); right after?

I’m wondering to what extend one can use hlsdl to pass parameters to the SDL library…