lethal-guitar / RigelEngine

A modern re-implementation of the classic DOS game Duke Nukem II

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow for pixel-perfect scaling at lower resolution

DukeSkinny opened this issue · comments

I was excited to try the new integer scaling feature on my CRT, but unfortunately RigelEngine won't allow me to use it at 640x400 or 320x200. Since these resolutions perfectly match the original assets I feel it should be allowed, and in any case I'm sure people looking for integer scaled graphics would be fine with black bars.

Hi @DukeSkinny, thanks for the suggestion! Makes total sense, I didn't consider the use case of running on a CRT when adding the feature but I can see that it would be very nice to have. I'll look into it!

One more thing worth mentioning: The reason pixel-perfect scaling currently requires at least 1600x1200 is because of the aspect ratio correction. This is not an issue when outputting to a 4:3 CRT, of course. But on a 1080p LCD for example, integer scaling up by 4 to 1280x800 would result in a squished image, since the vertical stretching originally done by a CRT isn't accounted for when scaling both axes by the same factor. The smallest possible integer factors which preserve the 1.2 pixel aspect ratio of 320x200 on a 4:3 CRT are 5x6, which gives us 1600x1200.

If your CRT supports that resolution, you could try running that as a temporary solution in the meantime.

@DukeSkinny I've added a new option "Integer scaling without aspect ratio correction", which should do what you're looking for. Give it a go and let me know if this is like what you had in mind!

RigelEngine_flexible_integer_scaling.zip

I'm not sure yet on how exactly I'll present this option in the menu, so this is just temporary right now.

EDIT: I noticed that I forgot to implement saving for this option, so you'll need to reselect it after restarting the game. I'll fix that once you've had a chance to try it out.

Works like a charm! Great job, and thank you!

Awesome, I'll integrate it properly then.