Author Topic: New stretch option for FBA!  (Read 5804 times)

Offline gausen

  • Newbies
  • *
  • Posts: 19
  • Karma: +2/-0
New stretch option for FBA!
« on: November 16, 2015, 01:58:47 pm »
Hi all. I've added a new stretch option in FBA. As you know regular stretch options are:
Normal stretch (no aspect correction).
Full stretch (no aspect correction, fullscreen coverage).
Correct aspect ratio (obviously is aspect corrected but only produces integer scaled graphics [great quality]).

The new stretch option is:
Correct aspect ratio stretched (which is aspect corrected but stretched so only horizontal or vertical black bars are visible. Never both).

Modified source code is attached. I've tested a few games with different blitters in two pc's and seems to work ok, though more testing is needed. Use at your own risk.

Best regards.

Offline dink

  • Administrator
  • *****
  • Posts: 2630
  • Karma: +224/-0
  • feed the horse yumyum
Re: New stretch option for FBA!
« Reply #1 on: November 16, 2015, 02:03:32 pm »
Thanks for your contribution, I will check it out soon :)

Offline iq_132

  • Administrator
  • *****
  • Posts: 3566
  • Karma: +374/-0
  • Just a lion with a sword
    • NeoSource
Re: New stretch option for FBA!
« Reply #2 on: November 16, 2015, 02:25:54 pm »
Ooooh! That's cool!


Offline gausen

  • Newbies
  • *
  • Posts: 19
  • Karma: +2/-0
Re: New stretch option for FBA!
« Reply #3 on: November 16, 2015, 02:42:17 pm »
Thanks for your contribution, I will check it out soon :)
Ooooh! That's cool!

Thanks for dropping by guys!  :biggrin:

Offline dink

  • Administrator
  • *****
  • Posts: 2630
  • Karma: +224/-0
  • feed the horse yumyum
Re: New stretch option for FBA!
« Reply #4 on: November 16, 2015, 03:16:46 pm »
*after compiling* This is friggin' great!! :D
good job buddy :)
it shall be merged.

best regards,
- dink

Offline dink

  • Administrator
  • *****
  • Posts: 2630
  • Karma: +224/-0
  • feed the horse yumyum
Re: New stretch option for FBA!
« Reply #5 on: November 16, 2015, 03:28:23 pm »
an idea I want to implement, or try as a slight modification to your excellent enhanced stretching code - to preserve the scanlines.  When scanlines are enabled, it looks horrible in fullscreen mode or at some sizes, because some pixels are different sizes than others (guessing) - and it creates somewhat of a moire effect.  Ideas?  :S 

Offline iq_132

  • Administrator
  • *****
  • Posts: 3566
  • Karma: +374/-0
  • Just a lion with a sword
    • NeoSource
Re: New stretch option for FBA!
« Reply #6 on: November 16, 2015, 03:36:09 pm »
Would you mind posting some screenshots for me?


Offline gausen

  • Newbies
  • *
  • Posts: 19
  • Karma: +2/-0
Re: New stretch option for FBA!
« Reply #7 on: November 16, 2015, 03:48:27 pm »
I have noted this too. Right now I can think of two routes, one is to read FBA source to learn how scanlines are passed (so something could be made at scanlines level). The other route is to make some new scanline algorithm more suited for dealing with pixel distorsion.

I don't know if this is completely solvable for sharp pixels. Perhaps some new scanline algorithm applied on a bi linear filtered image (or any other scaling that produces even pixels for that mater) could be a better solution.

I will start looking into this. May take me some time to have something to show you.

EDIT: It's possible to take screenshots from FBA with effects applied? (F12 is capturing an unaltered raw image).
« Last Edit: November 16, 2015, 03:59:19 pm by gausen »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3566
  • Karma: +374/-0
  • Just a lion with a sword
    • NeoSource
Re: New stretch option for FBA!
« Reply #8 on: November 16, 2015, 04:29:34 pm »
ALT+PRINT SCREEN. Though a screenshot w/filters option would be nice.


Offline gausen

  • Newbies
  • *
  • Posts: 19
  • Karma: +2/-0
Re: New stretch option for FBA!
« Reply #9 on: November 16, 2015, 04:41:41 pm »
Some screenshots here. From what I'm reading FBA have a different scanlines implementation for each blitter.

EDIT: Added a few shots with 2xPMHQ and w/o scanlines.
« Last Edit: November 16, 2015, 05:17:53 pm by gausen »

Offline gausen

  • Newbies
  • *
  • Posts: 19
  • Karma: +2/-0
Re: New stretch option for FBA!
« Reply #10 on: November 16, 2015, 06:39:58 pm »
Some new screenshots. Changed the way ZoomFactors are calculated.

Offline dink

  • Administrator
  • *****
  • Posts: 2630
  • Karma: +224/-0
  • feed the horse yumyum
Re: New stretch option for FBA!
« Reply #11 on: November 16, 2015, 07:39:01 pm »
nice! :)  ...code pls! :)

Offline gausen

  • Newbies
  • *
  • Posts: 19
  • Karma: +2/-0
Re: New stretch option for FBA!
« Reply #12 on: November 16, 2015, 08:14:52 pm »
nice! :)  ...code pls! :)

Sure thing! Here it is. It's only a modified D3D blitter. Should improve scanlines look for full stretch as well. I'm sure this can be further tweaked. For completeness similar changes should be made to all blitters.

Offline dink

  • Administrator
  • *****
  • Posts: 2630
  • Karma: +224/-0
  • feed the horse yumyum
Re: New stretch option for FBA!
« Reply #13 on: November 16, 2015, 08:16:21 pm »
Thanks, luckily the d3d blitter is the one I use :D

Offline dink

  • Administrator
  • *****
  • Posts: 2630
  • Karma: +224/-0
  • feed the horse yumyum
Re: New stretch option for FBA!
« Reply #14 on: November 16, 2015, 08:30:42 pm »
I tried the updated code, but I'm still getting a bit of a moire effect in windowed, in fullscreen its not as noticable, but you can tell its there.  Is there any way around this?
(click the images to make them bigger first)