Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion crates/egui_glow/src/shader/fragment.glsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#ifdef GL_ES
precision mediump float;
// To avoid weird distortion issues when rendering text etc, we want highp if possible.
// But apparently some devices don't support it, so we have to check first.
#if defined(GL_FRAGMENT_PRECISION_HIGH) && GL_FRAGMENT_PRECISION_HIGH == 1
precision highp float;
#else
precision mediump float;
#endif
#endif

uniform sampler2D u_sampler;
Expand Down
8 changes: 7 additions & 1 deletion crates/egui_glow/src/shader/vertex.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
#endif

#ifdef GL_ES
precision mediump float;
// To avoid weird distortion issues when rendering text etc, we want highp if possible.
// But apparently some devices don't support it, so we have to check first.
#if defined(GL_FRAGMENT_PRECISION_HIGH) && GL_FRAGMENT_PRECISION_HIGH == 1
precision highp float;
#else
precision mediump float;
#endif
#endif

uniform vec2 u_screen_size;
Expand Down