Skip to content

Commit

Permalink
[Shader] Conditionally use high-precision floats if available
Browse files Browse the repository at this point in the history
  • Loading branch information
oznogon committed Apr 5, 2023
1 parent f3e5326 commit 89be368
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/graphics/shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down

0 comments on commit 89be368

Please sign in to comment.