From 6acbd1f9e3bbd430caf833c8f3d7fc21745ca40b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 3 Dec 2022 20:37:58 +0100 Subject: [PATCH] Fix loading of texture shaders --- GPU/Common/PostShader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPU/Common/PostShader.cpp b/GPU/Common/PostShader.cpp index c282d541c1..636c1b39e8 100644 --- a/GPU/Common/PostShader.cpp +++ b/GPU/Common/PostShader.cpp @@ -50,6 +50,7 @@ void LoadPostShaderInfo(Draw::DrawContext *draw, const std::vector &direct } shaderInfo.clear(); + textureShaderInfo.clear(); auto appendShader = [&](const ShaderInfo &info) { auto beginErase = std::remove(shaderInfo.begin(), shaderInfo.end(), info.name); @@ -230,11 +231,10 @@ void LoadPostShaderInfo(Draw::DrawContext *draw, const std::vector &direct } shaderInfo.insert(shaderInfo.begin(), off); - textureShaderInfo.clear(); TextureShaderInfo textureOff{}; textureOff.name = "Off"; textureOff.section = "Off"; - textureShaderInfo.push_back(textureOff); + textureShaderInfo.insert(textureShaderInfo.begin(), textureOff); // We always want the not visible ones at the end. Makes menus easier. for (const auto &info : notVisible) {