Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Internal resolution without aspect ratio correction #510

Open
vadosnaprimer opened this issue Jun 17, 2022 · 0 comments
Open

Internal resolution without aspect ratio correction #510

vadosnaprimer opened this issue Jun 17, 2022 · 0 comments

Comments

@vadosnaprimer
Copy link
Contributor

vadosnaprimer commented Jun 17, 2022

Currently aspect ratio correction is being enforced, and you can't output the game in its original resolution without height getting stretched by a non-integer factor.

if (SCREENHEIGHT == 200 || SCREENHEIGHT == 400)
{
actualheight = 6*SCREENHEIGHT/5;
}

while (screen_multiply*SCREENWIDTH < 640 || screen_multiply*actualheight < 480)
{
screen_multiply++;
}

If authentic look of the game is needed in a video, prboom looks like the best solution (dosbox can't properly capture music, chocolate doom doesn't capture audio at all), but there's no way to disable all the modern goodizers. The game is still rendered at 480p at the very least, so all the polygons end up looking much smoother than they actually are. Sure people used to like how the game can be tweaked to look "better", but that also means the original thing is kinda not liked for what it is.

In addition, stretching the height by a non-integer factor is not what used to happen on a CRT monitor. It can't arbitrarily make scanlines thinner or thicker (unless you turn the knobs yourself), because the size of the beam is fixed (though it varies across monitor models). Instead the resolution mode currently in use dictates how dense the pixels are during a scanline (how often the color can change per line). And the 13h mode that doom works in makes pixels 1.2 times narrower - it shrinks the framebuffer horizontally, making the pixels non-square.

So to replicate that, we can upscale by 2 using nearest neighbor, and then shrink the frame horizontally to about 533 pixels using some algo that allows to blend pixels together (only professional CRT monitors like PVM could output really sharp image).

But to do all of that in post-production, we need a pixel perfect output in the video itself, which requires code hacks. Chocolate doom looks absolutely identical to how doom runs on DOS, but prboom needs one more option to look almost exactly like that (barring texture alignment).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant