[client] egl: re-process the texture and invalidate if a setting changed

This commit is contained in:
Geoffrey McRae
2021-08-10 07:50:39 +10:00
parent 685499a0e0
commit 64ed383128
3 changed files with 23 additions and 0 deletions

View File

@@ -266,12 +266,14 @@ void egl_desktopConfigUI(EGL_Desktop * desktop)
igSliderInt("##nvgain", &desktop->nvGain, 0, desktop->nvMax, format, 0);
igPopItemWidth();
bool invalidateCAS = false;
bool cas = desktop->ffxCASEnable;
igCheckbox("AMD FidelityFX CAS", &cas);
if (cas != desktop->ffxCASEnable)
{
desktop->ffxCASEnable = cas;
egl_textureEnableFilter(desktop->ffxCASHandle, cas);
invalidateCAS = true;
}
float sharpness = desktop->ffxUniform.f[0];
@@ -286,6 +288,13 @@ void egl_desktopConfigUI(EGL_Desktop * desktop)
{
desktop->ffxUniform.f[0] = sharpness;
egl_shaderSetUniforms(desktop->ffxCAS, &desktop->ffxUniform, 1);
invalidateCAS = true;
}
if (invalidateCAS)
{
egl_textureInvalidate(desktop->texture);
app_invalidateWindow(true);
}
}