From: Rudolf Polzer Date: Mon, 28 Jan 2013 14:00:21 +0000 (+0100) Subject: fix glsl formatting X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8f86364588a1e6001e2e5fad56498d4ba2831ea1;p=xonotic%2Fdarkplaces.git fix glsl formatting --- diff --git a/shader_hlsl.h b/shader_hlsl.h index 20770d18..eca8ded7 100644 --- a/shader_hlsl.h +++ b/shader_hlsl.h @@ -343,6 +343,39 @@ "\n" "\n" "\n" +"#ifdef MODE_GHOSTMOTIONBLUR\n" +" dp_varying mediump vec2 TexCoord1;\n" +" uniform sampler2D Texture_First;\n" +" uniform sampler2D Texture_Second;\n" +" uniform sampler2D Texture_Dither;\n" +" uniform highp float BitValue;\n" +" uniform mediump float Alpha;\n" +" uniform highp vec2 Rand2f;\n" +" \n" +" #ifdef VERTEX_SHADER\n" +" void main(void)\n" +" {\n" +" gl_Position = ModelViewProjectionMatrix * Attrib_Position;\n" +" TexCoord1 = Attrib_TexCoord0.xy;\n" +" }\n" +" #endif\n" +" \n" +" #ifdef FRAGMENT_SHADER\n" +" void main(void){\n;" +" vec4 tex1 = dp_texture2D(Texture_First , TexCoord1);\n" +" vec4 tex2 = dp_texture2D(Texture_Second, TexCoord1);\n" +" vec4 tex3 = dp_texture2D(Texture_Dither, TexCoord1*8.0+Rand2f);\n" +" dp_FragColor = (Alpha)*tex1 + (1.0-Alpha)*tex2 + (tex3-0.5)*BitValue;\n" +" // dp_FragColor = tex3*0.5; //To check the quality of the noise\n" +" // dp_FragColor = tex2*0.95+tex3*0.05*0.5; //To check for patterns in the noise (should be gray)\n" +" }\n" +" #endif\n" +" \n" +"#else // !MODE_GHOSTMOTIONBLUR\n" +"\n" +"\n" +"\n" +"\n" "#ifdef MODE_BLOOMBLUR\n" "#ifdef VERTEX_SHADER\n" "void main\n"