Merge pull request #24529 from akien-mga/opengl-2.1-lowp

GLES2: Define 'lowp' for OpenGL 2.1
This commit is contained in:
Rémi Verschelde 2018-12-21 15:56:05 +01:00 committed by GitHub
commit a0d8bfb0d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 7 deletions

View File

@ -2,6 +2,7 @@
[vertex]
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
#define highp
#else
@ -31,8 +32,6 @@ uniform vec4 src_rect;
uniform highp float time;
#ifdef USE_LIGHTING
// light matrices
@ -62,7 +61,6 @@ const bool at_light_pass = true;
const bool at_light_pass = false;
#endif
/* clang-format off */
VERTEX_SHADER_GLOBALS
@ -80,7 +78,6 @@ vec2 select(vec2 a, vec2 b, bvec2 c) {
void main() {
vec4 color = color_attrib;
#ifdef USE_INSTANCING
@ -159,13 +156,13 @@ VERTEX_SHADER_CODE
#endif
#endif
}
/* clang-format off */
[fragment]
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
#define highp
#else
@ -231,7 +228,6 @@ const bool at_light_pass = false;
uniform bool use_default_normal;
/* clang-format off */
FRAGMENT_SHADER_GLOBALS

View File

@ -2,6 +2,7 @@
[vertex]
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
#define highp
#else
@ -29,6 +30,7 @@ void main() {
[fragment]
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
#define highp
#else
@ -39,7 +41,6 @@ precision mediump int;
varying highp vec4 position_interp;
/* clang-format on */
void main() {
highp float depth = ((position_interp.z / position_interp.w) + 1.0) * 0.5 + 0.0; // bias

View File

@ -2,6 +2,7 @@
[vertex]
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
#define highp
#else
@ -56,6 +57,7 @@ void main() {
#define M_PI 3.14159265359
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
#define highp
#else

View File

@ -2,6 +2,7 @@
[vertex]
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
#define highp
#else
@ -25,6 +26,7 @@ void main() {
[fragment]
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
#define highp
#else

View File

@ -2,6 +2,7 @@
[vertex]
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
#define highp
#else
@ -32,6 +33,7 @@ void main() {
#endif
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
#define highp
#else

View File

@ -2,6 +2,7 @@
[vertex]
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
#define highp
#else
@ -29,6 +30,7 @@ void main() {
[fragment]
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
#define highp
#else

View File

@ -2,6 +2,7 @@
[vertex]
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
#define highp
#else
@ -653,6 +654,7 @@ VERTEX_SHADER_CODE
#endif
#ifdef USE_GLES_OVER_GL
#define lowp
#define mediump
#define highp
#else