From 487ac04d8333956e33e0789bf2234ad098d823d1 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 3 Jul 2018 15:17:27 +0100 Subject: [PATCH] When generating GLES shaders without uniforms, declare precision * This usually comes from debuguniforms.h, but if we exclude it we still need to declare the precision. --- renderdoc/data/glsl_shaders.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/renderdoc/data/glsl_shaders.cpp b/renderdoc/data/glsl_shaders.cpp index 53b71a68a..45d15ce63 100644 --- a/renderdoc/data/glsl_shaders.cpp +++ b/renderdoc/data/glsl_shaders.cpp @@ -43,9 +43,16 @@ void GenerateGLSLShader(std::vector &sources, ShaderType type, } if(uniforms) + { sources[1] = GetEmbeddedResource(glsl_debuguniforms_h); + } else - sources[1] = ""; + { + if(type == eShaderGLSLES) + sources[1] = "precision highp float; precision highp int;"; + else + sources[1] = ""; + } if(shader.find("#include \"texsample.h\"") != string::npos) {