]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - shader_glsl.h
reworked PRVM_EDICTFIELD* and PRVM_GLOBALFIELD* usage to have more
[xonotic/darkplaces.git] / shader_glsl.h
index f5fc5510452f876e904b37f09b9925595211babd..e924413d44604052812c7ffe4b3fc1a55fbcbdb7 100644 (file)
@@ -2,17 +2,8 @@
 "// written by Forest 'LordHavoc' Hale\n"
 "// shadowmapping enhancements by Lee 'eihrul' Salzman\n"
 "\n"
-"// GL ES and GLSL130 shaders use precision modifiers, standard GL does not\n"
-"#ifndef GL_ES\n"
-"#ifndef GLSL130\n"
-"#define lowp\n"
-"#define mediump\n"
-"#define highp\n"
-"#endif\n"
-"#endif\n"
-"\n"
 "#ifdef GLSL130\n"
-"precision mediump float;\n"
+"precision highp float;\n"
 "# ifdef VERTEX_SHADER\n"
 "#  define dp_varying out\n"
 "#  define dp_attribute in\n"
 "# define dp_shadow2D(a,b) float(shadow2D(a,b))\n"
 "#endif\n"
 "\n"
+"// GL ES and GLSL130 shaders use precision modifiers, standard GL does not\n"
+"// in GLSL130 we don't use them though because of syntax differences (can't use precision with inout)\n"
+"#ifndef GL_ES\n"
+"#define lowp\n"
+"#define mediump\n"
+"#define highp\n"
+"#endif\n"
+"\n"
 "#ifdef VERTEX_SHADER\n"
 "dp_attribute vec4 Attrib_Position;  // vertex\n"
 "dp_attribute vec4 Attrib_Color;     // color\n"