Skip to content

Commit

Permalink
Correct the gamma with the proper destination resolution when resampling
Browse files Browse the repository at this point in the history
  • Loading branch information
smallmodel authored Oct 21, 2024
1 parent c580ccd commit d2ed2f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/renderer/tr_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ void R_ResampledScreenShot(const char* filename, int destwidth, int destheight)

// gamma correct
if ( glConfig.deviceSupportsGamma ) {
R_GammaCorrect( buffer + 18, 128 * 128 * 3 );
R_GammaCorrect( buffer + 18, destheight * destwidth * 3 );
}

ri.FS_WriteFile( filename, buffer, destheight * destwidth * 3 + 18 );
Expand Down

0 comments on commit d2ed2f5

Please sign in to comment.