From 89be3687ea9a993ff9e468b4854885d593fb1a69 Mon Sep 17 00:00:00 2001 From: Oznogon Date: Wed, 5 Apr 2023 14:48:14 -0700 Subject: [PATCH] [Shader] Conditionally use high-precision floats if available --- src/graphics/shader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphics/shader.cpp b/src/graphics/shader.cpp index 8004eed3..cfb391a7 100644 --- a/src/graphics/shader.cpp +++ b/src/graphics/shader.cpp @@ -8,7 +8,7 @@ namespace sp { static Shader* current_shader = nullptr; static const char* vertex_shader_header_es = "#version 100\nprecision highp float;\n"; -static const char* fragment_shader_header_es = "#version 100\nprecision mediump float;\n"; +static const char* fragment_shader_header_es = "#version 100\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float\n#endif\n"; static const char* vertex_shader_header = "#version 120\n"; static const char* fragment_shader_header = "#version 120\n";