comment out 'precision' for desktop shaders

This commit is contained in:
Hannes Janetzek 2013-06-24 15:27:08 +02:00
parent 1f3041e6fe
commit ca85f6810f
5 changed files with 17 additions and 17 deletions

View File

@ -390,7 +390,7 @@ public class ExtrusionRenderLayer extends RenderLayer {
}; };
final static String extrusionVertexShader = "" final static String extrusionVertexShader = ""
+ "precision mediump float;" //+ "precision mediump float;"
+ "uniform mat4 u_mvp;" + "uniform mat4 u_mvp;"
+ "uniform vec4 u_color[4];" + "uniform vec4 u_color[4];"
+ "uniform int u_mode;" + "uniform int u_mode;"
@ -431,14 +431,14 @@ public class ExtrusionRenderLayer extends RenderLayer {
+ "}}}"; + "}}}";
final static String extrusionFragmentShader = "" final static String extrusionFragmentShader = ""
+ "precision mediump float;" //+ "precision mediump float;"
+ "varying vec4 color;" + "varying vec4 color;"
+ "void main() {" + "void main() {"
+ " gl_FragColor = color;" + " gl_FragColor = color;"
+ "}"; + "}";
final static String extrusionFragmentShaderZ = "" final static String extrusionFragmentShaderZ = ""
+ "precision mediump float;" // + "precision mediump float;"
+ "varying float depth;" + "varying float depth;"
+ "void main() {" + "void main() {"
+ "float d = depth * 0.2;" + "float d = depth * 0.2;"

View File

@ -249,7 +249,7 @@ public final class LineRenderer {
} }
private final static String lineVertexShader = "" private final static String lineVertexShader = ""
+ "precision mediump float;" //+ "precision mediump float;"
+ "uniform mat4 u_mvp;" + "uniform mat4 u_mvp;"
// factor to increase line width relative to scale // factor to increase line width relative to scale
+ "uniform float u_width;" + "uniform float u_width;"
@ -268,7 +268,7 @@ public final class LineRenderer {
+ "}"; + "}";
private final static String lineSimpleFragmentShader = "" private final static String lineSimpleFragmentShader = ""
+ "precision mediump float;" //+ "precision mediump float;"
+ "uniform sampler2D tex;" + "uniform sampler2D tex;"
+ "uniform float u_wscale;" + "uniform float u_wscale;"
+ "uniform float u_mode;" + "uniform float u_mode;"
@ -294,7 +294,7 @@ public final class LineRenderer {
private final static String lineFragmentShader = "" private final static String lineFragmentShader = ""
+ "#extension GL_OES_standard_derivatives : enable\n" + "#extension GL_OES_standard_derivatives : enable\n"
+ "precision mediump float;" //+ "precision mediump float;"
+ "uniform sampler2D tex;" + "uniform sampler2D tex;"
+ "uniform float u_mode;" + "uniform float u_mode;"
+ "uniform vec4 u_color;" + "uniform vec4 u_color;"

View File

@ -230,7 +230,7 @@ public class LineTexRenderer {
} }
final static String vertexShader = "" final static String vertexShader = ""
+ "precision mediump float;" //+ "precision mediump float;"
+ "uniform mat4 u_mvp;" + "uniform mat4 u_mvp;"
+ "uniform vec4 u_color;" + "uniform vec4 u_color;"
+ "uniform float u_pscale;" + "uniform float u_pscale;"
@ -258,7 +258,7 @@ public class LineTexRenderer {
//* //*
final static String fragmentShader = "" final static String fragmentShader = ""
+ "#extension GL_OES_standard_derivatives : enable\n" + "#extension GL_OES_standard_derivatives : enable\n"
+ " precision mediump float;" //+ " precision mediump float;"
+ " uniform vec4 u_color;" + " uniform vec4 u_color;"
+ " uniform vec4 u_bgcolor;" + " uniform vec4 u_bgcolor;"
+ " uniform float u_pwidth;" + " uniform float u_pwidth;"

View File

@ -427,7 +427,7 @@ public final class PolygonRenderer {
} }
private final static String polygonVertexShader = "" private final static String polygonVertexShader = ""
+ "precision mediump float;" //+ "precision mediump float;"
+ "uniform mat4 u_mvp;" + "uniform mat4 u_mvp;"
+ "attribute vec4 a_pos;" + "attribute vec4 a_pos;"
+ "void main() {" + "void main() {"
@ -435,14 +435,14 @@ public final class PolygonRenderer {
+ "}"; + "}";
private final static String polygonFragmentShader = "" private final static String polygonFragmentShader = ""
+ "precision mediump float;" //+ "precision mediump float;"
+ "uniform vec4 u_color;" + "uniform vec4 u_color;"
+ "void main() {" + "void main() {"
+ " gl_FragColor = u_color;" + " gl_FragColor = u_color;"
+ "}"; + "}";
private final static String polygonVertexShaderZ = "" private final static String polygonVertexShaderZ = ""
+ "precision highp float;" //+ "precision highp float;"
+ "uniform mat4 u_mvp;" + "uniform mat4 u_mvp;"
+ "attribute vec4 a_pos;" + "attribute vec4 a_pos;"
+ "varying float z;" + "varying float z;"
@ -451,7 +451,7 @@ public final class PolygonRenderer {
+ " z = gl_Position.z;" + " z = gl_Position.z;"
+ "}"; + "}";
private final static String polygonFragmentShaderZ = "" private final static String polygonFragmentShaderZ = ""
+ "precision highp float;" //+ "precision highp float;"
+ "uniform vec4 u_color;" + "uniform vec4 u_color;"
+ "varying float z;" + "varying float z;"
+ "void main() {" + "void main() {"
@ -466,7 +466,7 @@ public final class PolygonRenderer {
+ "}"; + "}";
private final static String textureVertexShader = "" private final static String textureVertexShader = ""
+ "precision mediump float;" //+ "precision mediump float;"
+ "uniform mat4 u_mvp;" + "uniform mat4 u_mvp;"
+ "uniform vec2 u_scale;" + "uniform vec2 u_scale;"
+ "attribute vec4 a_pos;" + "attribute vec4 a_pos;"
@ -479,7 +479,7 @@ public final class PolygonRenderer {
+ "}"; + "}";
private final static String textureFragmentShader = "" private final static String textureFragmentShader = ""
+ "precision mediump float;" //+ "precision mediump float;"
+ "uniform vec4 u_color;" + "uniform vec4 u_color;"
+ "uniform sampler2D tex;" + "uniform sampler2D tex;"
+ "uniform vec2 u_scale;" + "uniform vec2 u_scale;"

View File

@ -119,7 +119,7 @@ public final class TextureRenderer {
private final static double COORD_DIV = 1.0 / GLRenderer.COORD_SCALE; private final static double COORD_DIV = 1.0 / GLRenderer.COORD_SCALE;
private final static String textVertexShader = "" private final static String textVertexShader = ""
+ "precision mediump float; " // + "precision mediump float; "
+ "attribute vec4 vertex;" + "attribute vec4 vertex;"
+ "attribute vec2 tex_coord;" + "attribute vec2 tex_coord;"
+ "uniform mat4 u_mv;" + "uniform mat4 u_mv;"
@ -143,7 +143,7 @@ public final class TextureRenderer {
+ "}"; + "}";
private final static String textFragmentShader = "" private final static String textFragmentShader = ""
+ "precision mediump float;" // + "precision mediump float;"
+ "uniform sampler2D tex;" + "uniform sampler2D tex;"
+ "varying vec2 tex_c;" + "varying vec2 tex_c;"
+ "void main() {" + "void main() {"