mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 15:22:08 +00:00
- Add missing screenshot sRGB gamma when vid_hdr is active
This commit is contained in:
parent
a61559078c
commit
ed0dccdc1f
1 changed files with 3 additions and 0 deletions
|
@ -58,6 +58,7 @@ void gl_LoadExtensions();
|
|||
void gl_PrintStartupLog();
|
||||
void Draw2D(F2DDrawer *drawer, FRenderState &state);
|
||||
|
||||
extern bool vid_hdr_active;
|
||||
|
||||
CUSTOM_CVAR(Int, vid_hwgamma, 2, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||
{
|
||||
|
@ -466,6 +467,8 @@ TArray<uint8_t> OpenGLFrameBuffer::GetScreenshotBuffer(int &pitch, ESSType &colo
|
|||
|
||||
// Screenshot should not use gamma correction if it was already applied to rendered image
|
||||
gamma = 1 == vid_hwgamma || (2 == vid_hwgamma && !fullscreen) ? 1.0f : Gamma;
|
||||
if (vid_hdr_active && fullscreen)
|
||||
gamma *= 2.2f;
|
||||
return ScreenshotBuffer;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue