Author Topic: HQX and scale2x filters edit: Now with OpenGL shaders  (Read 7819 times)

Offline hmaon

  • Sergeant
  • **
  • Posts: 40
  • C jockey
    • View Profile
    • Email
HQX and scale2x filters edit: Now with OpenGL shaders
« on: February 09, 2013, 03:53:24 am »
After getting all the FPS I could for now out of the game, I've taken steps to make it slower instead. That is, HQX and Scale2x filters are now an option with this code: https://github.com/hmaon/OpenXcom/tree/remix

The results are a little weird but kind of nice at times. Screenshots attached!

edit: OpenGL stuff in a reply below somewhere
« Last Edit: February 17, 2013, 12:16:45 am by hmaon »

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
    • Email
Re: HQX and scale2x filters
« Reply #1 on: February 09, 2013, 09:42:08 am »
Yeah, that's the kind of effect you get from HQX, I made a topic about it ages ago: https://openxcom.org/forum/index.php/topic,118 with a screenshot, and because nobody really liked it, it was never implemented.
But since then the community has grown, the chances are there are a few people out there that might like it... I'm not sure I would ever use it, it gives freaky results sometimes.

I think it's because the native resolution, sprites of 32x40 px, is just a bit too low for scalers to make something out of it. They look a lot better on old games that just have tiny bit more resolution and natively run on 640x480 and up.
« Last Edit: February 09, 2013, 09:50:36 am by Daiky »

Offline MrWigggles

  • Squaddie
  • *
  • Posts: 9
    • View Profile
    • Email
Re: HQX and scale2x filters
« Reply #2 on: February 09, 2013, 12:06:47 pm »
The softening effect, makes it look more blurry to me, then the defaults now. I find the default for now having more details and better definition.

anonilsus

  • Guest
Re: HQX and scale2x filters
« Reply #3 on: February 09, 2013, 01:51:01 pm »
Since I actively requested HQX and already compiled and played the branch: I really like it.
Besides the subjective point of view it is also good to have from a technical standpoint since modding is planned and they CAN get to a slightly higher pixel resolution.

Offline hmaon

  • Sergeant
  • **
  • Posts: 40
  • C jockey
    • View Profile
    • Email
Re: HQX and scale2x filters
« Reply #4 on: February 09, 2013, 06:24:32 pm »
That's about the response I expected.  ;) At least a couple of people like it though so the relatively small effort was worth it to me.

As someone request on IRC, I'll try to add another option -- hq2x at 4x scale. Then also maybe 2xSAI.

Offline Fenyő

  • Colonel
  • ****
  • Posts: 423
    • View Profile
Re: HQX and scale2x filters
« Reply #5 on: February 09, 2013, 06:30:48 pm »
I don't see what is the problem here.
Just make it optional with an identifier in the options.cfg, and turn it off by default.
And if someone likes it, he/she turns it on in the options.cfg.

Offline hmaon

  • Sergeant
  • **
  • Posts: 40
  • C jockey
    • View Profile
    • Email
Re: HQX and scale2x filters
« Reply #6 on: February 09, 2013, 07:30:49 pm »
*shrug*

Yes, the filters are already controlled by options in the config file.

Offline pmprog

  • Commander
  • *****
  • Posts: 651
  • Contributor
    • View Profile
    • Polymath Programming
Re: HQX and scale2x filters
« Reply #7 on: February 10, 2013, 08:15:22 pm »
Looks good. I might have a fiddle around with them before my next LP episode

Offline hmaon

  • Sergeant
  • **
  • Posts: 40
  • C jockey
    • View Profile
    • Email
Re: HQX and scale2x filters edit: Now with OpenGL shaders
« Reply #8 on: February 17, 2013, 12:25:33 am »
I've copied the OpenGL output code from bsnes and jammed it into OXC. It's faster than scaling the image on the CPU and it trivially allows the use of a bunch of shaders from other authors. I'm attaching some screenshots. Some are nice and subtle, like Scale4xHQ, while others are ugly as hell (bloom!)

Offline hmaon

  • Sergeant
  • **
  • Posts: 40
  • C jockey
    • View Profile
    • Email
Re: HQX and scale2x filters edit: Now with OpenGL shaders
« Reply #9 on: February 17, 2013, 12:27:37 am »
Only 5 attachments per post?!?!?!? This is an outrage!


Offline luke83

  • Commander
  • *****
  • Posts: 1564
    • View Profile
    • openxcommods
    • Email
Re: HQX and scale2x filters edit: Now with OpenGL shaders
« Reply #10 on: February 17, 2013, 01:18:11 am »
Looking good , i cant wait until this is a standard feature ;D