Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Anti Alias - Rendertarget — Gideros Forum

Anti Alias - Rendertarget

ChrisFChrisF Member
edited February 2016 in General questions
After putting out my first couple of crappy casino games to get a feel for Gideros I have started work on something more meaty.

On one of the layers there is alot changing per frame so I thought a Rendertarget as that layer would be better for a quick clear, the layer is a mixture of Matrix renders and Sprites.
However I am noticing there appears to be no anti-aliasing in a Rendertarget.

So question is two fold.
1) Did I choose the right thing or should I just do a Sprite layer with a clear routine ?
2) If Rendertarget was correct how can I get anti aliasing.

Comments

  • Hi @ChrisF
    renderTarget is a heavy process, but it may be the only way to achieve some effects. Its resource consumption is related to the size of the area you render - for a "fog of war effect" I render a scaled down portion of screen and then scale it up to fill my screen, but it's not always an option (it depends on what you need to do :) ).

    To enable anti-alias I think it should be enough to append "true" when you create it:
    local rt = RenderTarget.new (sizeW, sizeH, true)
  • Thanks, by resource heavy do you mean just memory or processing ?
  • I never investigated that, I'd say both if you call it continuously: otherwise memory because it renders a texture :)
  • @ChrisF I use rendertarget a lot, no problems with speed here.

    Likes: antix

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 )Share on Facebook
  • @SinisterSoft - thanks, that has reassured me ! - had banked alot on it being efficient :-)

  • SinisterSoftSinisterSoft Maintainer
    edited February 2016
    It may depend on the device, but in reality you are always rendering on a 'texture' - a texture is just a block of video memory - so the actual 'stage' should be the same - this is then rendered again by the OS layering system.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • I second that. Using RenderTargets for some time without large performance hits.
  • Thanks for reassurance, it's kinda what I thought but without knowing the pipeline etc. behind the scenes you can never be sure. Oh I miss the days of a good pixel plotting routine :-)
    +1 -1 (+2 / -0 )Share on Facebook
Sign In or Register to comment.