CODE PATCH: Ultrawide support for Doom

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: CODE PATCH: Ultrawide support for Doom

Re: CODE PATCH: Ultrawide support for Doom

by musante » Sun Aug 21, 2016 10:25 am

Any update on this? Has it officially been added to the patch?

Re: CODE PATCH: Ultrawide support for Doom

by PlayerLin » Sun Mar 06, 2016 12:43 am

_mental_ wrote:
Nash wrote:It was hilarious to see the exact same phenomenon in a triple-A game. xD
In a PC port of AAA game :) Never forget that consoles have 16:9 no matter what.
Yeah, BGS's games are "console-based" and PC one was "ported" from that, but...I'm not sure 21:9 is more popular than 16:9 in PC gaming and since the menu of Fallout 4 Launcher for selecting ratios/resolutions keeps screwed up on my Win7 x64 then I won't be surprised. :p

Re: CODE PATCH: Ultrawide support for Doom

by _mental_ » Fri Mar 04, 2016 6:54 am

Nash wrote:It was hilarious to see the exact same phenomenon in a triple-A game. xD
In a PC port of AAA game :) Never forget that consoles have 16:9 no matter what.

Re: CODE PATCH: Ultrawide support for Doom

by Nash » Fri Mar 04, 2016 6:50 am

Just a slightly offtopic comment... I was checking out some 21:9 videos of Fallout 4 and it looks like when zooming in with snipers, the fullscreen scope overlay appears to be made only for 16:9 - so you actually see the 3D display at the sides where the sniper zoom overlay gets cut off! This completely reminds me of ZDoom mods that use a similar concept of fullscreen graphics/HudMessages but not supporting wider displays! It was hilarious to see the exact same phenomenon in a triple-A game. xD

Similarly, my fear for this since a few years ago has led me to devise a solution which I have been using for many years now for the project I'm developing - beyond the center "piece" of the fullscreen graphic, I draw two more completely black fullscreen 16:9 overlays at the left and right sides of the center overlay... the idea being "that should cover any aspect ratios I'd never think of!". I used to think it was completely unnecessary and overkill (we're talking by 2010'ish standards) but it looks like I wasn't far off in predicting that this would become a problem in future... =P

Re: CODE PATCH: Ultrawide support for Doom

by Zardoz » Fri Mar 04, 2016 6:29 am

Push this ASAP! 21:9 monitors are here and becoming more popular. Also, ultra wide screen looks very awesome on any 3d game.

Re: CODE PATCH: Ultrawide support for Doom

by Blzut3 » Thu Mar 03, 2016 9:48 pm

I've said somewhere before, while I think having proper support for arbitrary aspect ratios is a good idea, there are some cases where it makes sense to adjust to a fixed ratio. For example the disagreement on 16:9 768 vertical resolutions between manufactures. If one uses arbitrary ratios then art designed for 16:9 will not properly fill those screens even though it's just a few pixels off from true 16:9.

Then of course there's our support for anamorphic aspect ratios which is probably handy to have easy selection of common ratios. I'm sure artists also like to be able to target a fixed set of ratios.

Therefore I'm still of the opinion that we should have a fixed list of common ratios as the default behavior and have the user opt in via the console to their true aspect ratio if desired. Or it could default to some semi-automatic mode where if the ratio appears to be far removed from any supported ratio it turns on.

Re: CODE PATCH: Ultrawide support for Doom

by randi » Thu Mar 03, 2016 6:02 pm

Graf Zahl wrote:I honestly think that this stuff should be genuinely fixed, instead of seeing yet another ratio getting hacked in.
I agree, but that hasn't happened yet and 21:9 monitors exist now.
Caligari_87 wrote:I wasn't aware that extra resolutions were "hacked" in the first place.
Ratios, not resolutions.

Re: CODE PATCH: Ultrawide support for Doom

by Major Cooke » Thu Mar 03, 2016 11:24 am

Graf Zahl wrote:I still go by the currently implemented two-man-rule here. I'm undecided so we need a second opinion here.
Speaking of which... I think either this should be moved to code submissions so people can see that sticky, or that sticky be made visible in the feature suggestions general forum.

Re: CODE PATCH: Ultrawide support for Doom

by Caligari87 » Thu Mar 03, 2016 11:21 am

Well, I'm not a Dev so I can't sway the vote, but what kind of work would be involved in getting the other stuff fixed (I assume so arbitrary resolutions are possible)? I wasn't aware that extra resolutions were "hacked" in the first place.

8-)

Re: CODE PATCH: Ultrawide support for Doom

by Graf Zahl » Thu Mar 03, 2016 3:01 am

I still go by the currently implemented two-man-rule here. I'm undecided so we need a second opinion here.

Re: CODE PATCH: Ultrawide support for Doom

by MadTux » Wed Mar 02, 2016 11:50 pm

I don't really see any reason not to include the patch. Yes, it's sort of hacked in, but until we *do* have other options, isn't it better to at least have 12:9 at all?

Re: CODE PATCH: Ultrawide support for Doom

by sludge » Wed Mar 02, 2016 7:41 pm

I honestly think that this stuff should be genuinely fixed, instead of seeing yet another ratio getting hacked in.
The act of eventually fixing the cruft isn't harmed by having the feature in place in the interim. The code patch follows all of the existing logic.
Besides, 21:9 would probably be better served by cropping the top and bottom somewhat than having such a distorted display.
Did you try it on the target hardware, or are you just looking at the screenshots on a non-UW monitor? The screenshots were taken at fov 105 with +mlook on and the camera pitched slightly, the author's preference.

Re: CODE PATCH: Ultrawide support for Doom

by Graf Zahl » Wed Mar 02, 2016 6:05 pm

I honestly think that this stuff should be genuinely fixed, instead of seeing yet another ratio getting hacked in. Besides, 21:9 would probably be better served by cropping the top and bottom somewhat than having such a distorted display.

I'm going to wait for other opinions.

CODE PATCH: Ultrawide support for Doom

by sludge » Wed Mar 02, 2016 5:23 pm

Today, I coded a patch that adds aspect ratio-correct Ultrawide 21:9 support to ZDoom. This is the ratio used in many new ultrawide monitors, such as the 34" Acer Predator x34. I have tested it at 3440x1440 and it looks great.

Here are some screenshots I took while playing:
http://imgur.com/a/ZV931

The patch has the following features:
- vid_aspect 6 forces 21:9
- 21:9 resolution autodetection works with vid_aspect 0 as expected.
- 21:9 aspect ratio has been added to the menus and modes can be selected
- all of the intermission and end level screens, credits and scrolling screens have been tested and work.

Notes to maintainers:
- This patch was created from HEAD of origin/master today.

- In many places, the test (ratio & 3) showed up in the code. In others, (ratio & 4) was used as a test. This sort of testing no longer works with newer aspect ratio options. Very simple one-line inline functions have been created to perform these tests and all of the bitwise tests have been replaced.

- Special care was taken to not stretch the fullscreen images (credits, title), but instead to apply black bars as expected.

- Tested on a playthrough of all intermission screens in Doom and Doom 2. No known issues.

- It has to draw a lot of pixels! This is taxing for a software renderer, even on a modern machine. It is tractible with a higher end PC today, however.

- Prior to my work, CheckRatio() used "vid_aspect 5" to create a "fakeratio" of 3. Because of this, the 5th entry in BaseRatioSizes has to be padded out and made redundant and the 21:9 aspect ratio has to be "vid_aspect 6". There is a comment to this effect in v_video.cpp.

- 21:9(2.333) is a marketing/public facing term for what is actually 64:27(2.37). The aspect ratio we use is actually 64:27, which is slightly different, but correct. However, all of the user-facing strings say 21:9 because that's what everyone expects.
Attachments
zdoom_ultrawide_patch.txt
(13.27 KiB) Downloaded 955 times

Top