add "vid.udup" same as vid.dup but not scaled with "highreshudscale"

This commit is contained in:
Alug committed 2026-01-22 14:25:33 +01:00
1 parent 422c480a69
commit 41802df348
3 files changed
+8 -8

No files matched your search

+1 -2
View File
@@ -3629,8 +3629,7 @@ void GL_RenderVhsEffect(fixed_t upbary, fixed_t downbary, UINT8 updistort, UINT8
uint32_t r = rand();
const float dup = min(scrwf / BASEVIDWIDTH, scrwh / BASEVIDHEIGHT);
const float ystep = 2.f/scrwh * dup/4.f;
const float ystep = 2.f/scrwh * (float)vid.udup/4.f;
for (i = 0; i < 1; i += ystep)
{
+1
View File
@@ -63,6 +63,7 @@ typedef struct viddef_s
INT32 dup; // scale 1, 2, 3 value for menus & overlays
INT32 fdup; // same as dup, but exact value when aspect ratio isn't 320/200
INT32 udup; // same as dup but does not account for highreshudscale
UINT8 smalldup; // factor for a little bit of scaling
UINT8 meddup; // factor for moderate, but not full, scaling
+6 -6
View File
@@ -1760,17 +1760,15 @@ void V_DrawVhsEffect(boolean rewind)
if (cv_reducevfx.value)
return;
const INT32 dup = min(vid.width / BASEVIDWIDTH, vid.height / BASEVIDHEIGHT);
barsize = dup << 5;
updistort = dup << (rewind ? 5 : 3);
barsize = vid.udup << 5;
updistort = vid.udup << (rewind ? 5 : 3);
downdistort = updistort >> 1;
if (rewind)
V_DrawVhsEffect(false); // experimentation
upbary -= renderdeltatics * (fixed_t)(dup * (rewind ? 3 : 1.8f));
downbary += renderdeltatics * (dup * (rewind ? 2 : 1));
upbary -= renderdeltatics * (fixed_t)(vid.udup * (rewind ? 3 : 1.8f));
downbary += renderdeltatics * (vid.udup * (rewind ? 2 : 1));
if (upbary < -barsize*FRACUNIT)
upbary = vid.height << FRACBITS;
@@ -3930,6 +3928,8 @@ void V_Recalc(void)
vid.fdup = (vid.height*FRACUNIT) / BASEVIDHEIGHT;
}
vid.udup = vid.dup;
if (loaded_config // this could use a better name, since it is more and indicator that early startup is done and its safe to do sketchy shit now :chaosleep:
&& (vid.width > 720) && (vid.height > 1280)) // ehhhh well this thing has so many issues, so ill lock it to higher resolutions instead
{