瀏覽代碼

Use highp for GLSL vertex shader (#960)

Christian Zommerfelds 4 年之前
父節點
當前提交
d46267d506
共有 1 個文件被更改,包括 7 次插入2 次删除
  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;