Skip to content

Commit

Permalink
Avoid potentially applying dithering twice for softemu 1
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-drexler committed Aug 30, 2024
1 parent d0b61c2 commit 01c41c3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Quake/gl_rmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,16 +930,21 @@ void R_SetupView (void)
r_framedata.eyepos[1] = r_refdef.vieworg[1];
r_framedata.eyepos[2] = r_refdef.vieworg[2];
r_framedata.time = cl.time;
if (softemu == SOFTEMU_FINE || softemu == SOFTEMU_COARSE)
if (softemu == SOFTEMU_COARSE)
{
r_framedata.screendither = NOISESCALE * r_dither.value * r_softemu_dither_screen.value;
r_framedata.texturedither = NOISESCALE * r_dither.value * r_softemu_dither_texture.value;
}
else
else if (softemu == SOFTEMU_OFF)
{
r_framedata.screendither = r_dither.value * (1.f/255.f);
r_framedata.texturedither = 0.f;
}
else // FINE (screen-space dithering applied during postprocessing), or BANDED (no dithering)
{
r_framedata.screendither = 0.f;
r_framedata.texturedither = 0.f;
}

Fog_SetupFrame (); //johnfitz
Sky_SetupFrame ();
Expand Down

0 comments on commit 01c41c3

Please sign in to comment.