From c6be37e019e2a1ba4771a78c824261a5db6faee9 Mon Sep 17 00:00:00 2001 From: Timo Lotterbach Date: Mon, 12 Dec 2011 14:18:22 +0100 Subject: [PATCH] EGLX11MockNavigation: fixed shader to mediump instead of highp to support egl minimum opengl es 2.0 feature set --- .../EGLX11MockNavigation/src/ShaderLighting.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/LayerManagerExamples/EGLX11MockNavigation/src/ShaderLighting.cpp b/LayerManagerExamples/EGLX11MockNavigation/src/ShaderLighting.cpp index 7e4170f..94e49a8 100644 --- a/LayerManagerExamples/EGLX11MockNavigation/src/ShaderLighting.cpp +++ b/LayerManagerExamples/EGLX11MockNavigation/src/ShaderLighting.cpp @@ -20,9 +20,9 @@ #include "IlmMatrix.h" const char* vertexShaderCode = - "attribute highp vec4 a_vertex; \ + "attribute mediump vec4 a_vertex; \ uniform mediump mat4 u_modelMatrix; \ - varying highp vec4 v_normal; \ + varying mediump vec4 v_normal; \ void main(void) \ { \ gl_Position = u_projectionMatrix * u_modelMatrix * a_vertex; \ @@ -30,11 +30,11 @@ const char* vertexShaderCode = }"; const char* fragmentShaderCode = - "uniform mediump vec4 u_color; \ - varying highp vec4 v_normal; \ - highp vec4 lightPosition; \ - void main (void) \ - { \ + "uniform mediump vec4 u_color; \ + varying mediump vec4 v_normal; \ + mediump vec4 lightPosition; \ + void main (void) \ + { \ lightPosition = normalize(vec4(-3.0, -5.0, 10.0, 1.0)); \ gl_FragColor = max(dot(v_normal, lightPosition), 0.0) * 0.5 * u_color + 0.8 * u_color; \ gl_FragColor.a = 1.0; \ -- 2.7.4