From 3a787f46a588e52499fa0bd2ed5c6ffac5f5e30a Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Wed, 23 Oct 2013 22:58:21 +0200 Subject: [PATCH] Hide shaders we can't run on GLES2 --- GPU/Common/PostShader.cpp | 8 ++++++++ assets/shaders/defaultshaders.ini | 1 + 2 files changed, 9 insertions(+) diff --git a/GPU/Common/PostShader.cpp b/GPU/Common/PostShader.cpp index dc4ef9264f..2f959b4908 100644 --- a/GPU/Common/PostShader.cpp +++ b/GPU/Common/PostShader.cpp @@ -83,6 +83,14 @@ void LoadPostShaderInfo(std::vector directories) { section.Get("Vertex", &temp, ""); info.vertexShaderFile = path + "/" + temp; section.Get("OutputResolution", &info.outputResolution, false); + +#ifdef USING_GLES2 + // Let's ignore shaders we can't support. TODO: Check for GLES 3.0 + bool requiresIntegerSupport; + section.Get("RequiresIntSupport", &requiresIntegerSupport, false); + if (requiresIntegerSupport) + continue; +#endif shaderInfo.erase(std::find(shaderInfo.begin(), shaderInfo.end(), info.name), shaderInfo.end()); shaderInfo.push_back(info); } diff --git a/assets/shaders/defaultshaders.ini b/assets/shaders/defaultshaders.ini index 68a3f2c941..1b518b2a8b 100644 --- a/assets/shaders/defaultshaders.ini +++ b/assets/shaders/defaultshaders.ini @@ -45,3 +45,4 @@ Name=Spline36 Upscaler Fragment=upscale_spline36.fsh Vertex=upscale_spline36.vsh OutputResolution=True +RequiresIntSupport=True \ No newline at end of file