mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-13 07:57:51 +00:00
- Add missing screenshot sRGB gamma when vid_hdr is active
This commit is contained in:
parent
d057af7c3b
commit
850ef1cd78
1 changed files with 3 additions and 0 deletions
|
@ -58,6 +58,7 @@ void gl_LoadExtensions();
|
||||||
void gl_PrintStartupLog();
|
void gl_PrintStartupLog();
|
||||||
void Draw2D(F2DDrawer *drawer, FRenderState &state);
|
void Draw2D(F2DDrawer *drawer, FRenderState &state);
|
||||||
|
|
||||||
|
extern bool vid_hdr_active;
|
||||||
|
|
||||||
CUSTOM_CVAR(Int, vid_hwgamma, 2, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
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
|
// 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;
|
gamma = 1 == vid_hwgamma || (2 == vid_hwgamma && !fullscreen) ? 1.0f : Gamma;
|
||||||
|
if (vid_hdr_active && fullscreen)
|
||||||
|
gamma *= 2.2f;
|
||||||
return ScreenshotBuffer;
|
return ScreenshotBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue