X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=shader_glsl.h;h=e924413d44604052812c7ffe4b3fc1a55fbcbdb7;hb=cd7c0e497fccf105eab804125cb296d1a79f334f;hp=44d84da3fc67e89e7cbcffe93189f09921c0df95;hpb=d77dc900bbaf95e3c45141381dd56abfccb9661c;p=xonotic%2Fdarkplaces.git diff --git a/shader_glsl.h b/shader_glsl.h index 44d84da3..e924413d 100644 --- a/shader_glsl.h +++ b/shader_glsl.h @@ -2,14 +2,8 @@ "// written by Forest 'LordHavoc' Hale\n" "// shadowmapping enhancements by Lee 'eihrul' Salzman\n" "\n" -"// GL ES shaders use precision modifiers, standard GL does not\n" -"#ifndef GL_ES\n" -"#define lowp\n" -"#define mediump\n" -"#define highp\n" -"#endif\n" -"\n" "#ifdef GLSL130\n" +"precision highp float;\n" "# ifdef VERTEX_SHADER\n" "# define dp_varying out\n" "# define dp_attribute in\n" @@ -41,6 +35,14 @@ "# 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"