Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
6 changes: 6 additions & 0 deletions crates/egui_glow/src/shader/fragment.glsl
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#ifdef GL_ES
// 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
Comment thread
wareya marked this conversation as resolved.

uniform sampler2D u_sampler;

Expand Down
6 changes: 6 additions & 0 deletions crates/egui_glow/src/shader/vertex.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@
#endif

#ifdef GL_ES
// 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
Comment thread
wareya marked this conversation as resolved.

uniform vec2 u_screen_size;
I vec2 a_pos;
Expand Down