- use glVertexAttrib consistently for the presentation drawcall.

- fixed vid_saturation default and adjusted ranges for gamma correction CVARs.
This commit is contained in:
Christoph Oelckers 2019-12-29 14:35:24 +01:00
parent 26dbf5fe10
commit d80159b76a
2 changed files with 8 additions and 13 deletions

View file

@ -476,30 +476,25 @@ CUSTOM_CVAR(String, playername, "Player", CVAR_ARCHIVE | CVAR_USERINFO)
CUSTOM_CVARD(Float, vid_gamma, 1.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "adjusts gamma component of gamma ramp")
{
if (self < 0) self = 0;
else if (self > 5) self = 5;
// todo: tell the system to update
else if (self > 4) self = 4;
}
CUSTOM_CVARD(Float, vid_contrast, 1.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "adjusts contrast component of gamma ramp")
{
if (self < 0) self = 0;
else if (self > 5) self = 5;
// todo: tell the system to update
}
CUSTOM_CVARD(Float, vid_brightness, 0.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "adjusts brightness component of gamma ramp")
{
if (self < 0) self = 0;
else if (self > 5) self = 5;
// todo: tell the system to update
if (self < -2) self = -2;
else if (self > 2) self = 2;
}
CUSTOM_CVARD(Float, vid_saturation, 0.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "adjusts saturation component of gamma ramp")
CUSTOM_CVARD(Float, vid_saturation, 1.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "adjusts saturation component of gamma ramp")
{
if (self < -3) self = -3;
else if (self > 3) self = 3;
// todo: tell the system to update
}
CVAR(Int, gl_satformula, 1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);

View file

@ -59,13 +59,13 @@ void FGLRenderer::RenderScreenQuad()
#else
glBegin(GL_TRIANGLE_STRIP);
glVertexAttrib2f(1, 0, 0);
glVertex2f(-1, -1);
glVertexAttrib2f(0, -1, -1);
glVertexAttrib2f(1, 0, 1);
glVertex2f(-1, 1);
glVertexAttrib2f(0, -1, 1);
glVertexAttrib2f(1, 1, 0);
glVertex2f(1, -1);
glVertexAttrib2f(0, 1, -1);
glVertexAttrib2f(1, 1, 1);
glVertex2f(1,1);
glVertexAttrib2f(0, 1,1);
glEnd();
#endif
}