Browse Source

Use highp for GLSL vertex shader (#960)

Christian Zommerfelds 4 years ago
parent
commit
d46267d506
1 changed files with 7 additions and 2 deletions
  1. 7 2
      hxsl/GlslOut.hx

+ 7 - 2
hxsl/GlslOut.hx

@@ -653,11 +653,16 @@ class GlslOut {
 		buf = new StringBuf();
 		exprValues = [];
 
-		decl("precision mediump float;");
-
 		if( s.funs.length != 1 ) throw "assert";
 		var f = s.funs[0];
 		isVertex = f.kind == Vertex;
+		
+		if (isVertex) {
+			decl("precision highp float;");
+		} else {
+			decl("precision mediump float;");
+		}
+
 		initVars(s);
 
 		var tmp = buf;