Explorar o código

Use highp for GLSL vertex shader (#960)

Christian Zommerfelds %!s(int64=4) %!d(string=hai) anos
pai
achega
d46267d506
Modificáronse 1 ficheiros con 7 adicións e 2 borrados
  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;