mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-21 11:01:36 +00:00
- Add missing screenshot sRGB gamma when vid_hdr is active
# Conflicts: # src/gl/system/gl_framebuffer.cpp # Conflicts: # src/gl/system/gl_framebuffer.cpp
This commit is contained in:
parent
b359b65f35
commit
011176668a
1 changed files with 4 additions and 0 deletions
|
@ -64,6 +64,8 @@ FGLRenderer *GLRenderer;
|
|||
void gl_LoadExtensions();
|
||||
void gl_PrintStartupLog();
|
||||
|
||||
extern bool vid_hdr_active;
|
||||
|
||||
CUSTOM_CVAR(Int, vid_hwgamma, 2, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||
{
|
||||
if (self < 0 || self > 2) self = 2;
|
||||
|
@ -524,6 +526,8 @@ void OpenGLFrameBuffer::GetScreenshotBuffer(const uint8_t *&buffer, int &pitch,
|
|||
// Screenshot should not use gamma correction if it was already applied to rendered image
|
||||
EXTERN_CVAR(Bool, fullscreen);
|
||||
gamma = 1 == vid_hwgamma || (2 == vid_hwgamma && !fullscreen) ? 1.0f : Gamma;
|
||||
if (vid_hdr_active && fullscreen)
|
||||
gamma *= 2.2f;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
Loading…
Reference in a new issue