Skip to content

Commit

Permalink
Disable texture-space dithering with r_fullbright 1
Browse files Browse the repository at this point in the history
r_fullbright replaces the actual lightmap texture with a 2x2 50% grey one. Since texture-space dithering is applied on a scale of 1/16 of a lightmap texel, this would lead to massively overscaled dithering patterns.
  • Loading branch information
andrei-drexler committed Sep 8, 2024
1 parent 5d46589 commit d4452b4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Quake/gl_rmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,13 @@ void R_SetupView (void)
{
r_framedata.screendither = NOISESCALE * r_dither.value * r_softemu_dither_screen.value;
r_framedata.texturedither = NOISESCALE * r_dither.value * r_softemu_dither_texture.value;

// r_fullbright replaces the actual lightmap texture with a 2x2 50% grey one.
// Since texture-space dithering is applied on a scale of 1/16 of a lightmap texel,
// this would lead to massively overscaled dithering patterns, so we disable
// texture-space dithering in this case.
if (r_fullbright_cheatsafe)
r_framedata.texturedither = 0.f;
}
else if (softemu == SOFTEMU_OFF)
{
Expand Down

0 comments on commit d4452b4

Please sign in to comment.