Improve shader version selection

This commit is contained in:
Richard 2021-11-11 01:10:47 -03:00
parent afdf3e799a
commit e31566d430
17 changed files with 179 additions and 69 deletions

View file

@ -0,0 +1,18 @@
#ifdef GL_ES
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
#endif
#ifdef HIGHER_THAN_300
out vec4 fragColor;
#define gl_FragColor fragColor
#endif
in vec4 v_Color;
void main() {
gl_FragColor = v_Color;
}

View file

@ -0,0 +1,11 @@
uniform mat4 u_Transform;
in vec2 i_Position;
in vec4 i_Color;
out vec4 v_Color;
void main() {
gl_Position = u_Transform * vec4(i_Position, 0.0, 1.0);
v_Color = i_Color;
}