]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix glsl formatting
authorRudolf Polzer <divverent@xonotic.org>
Mon, 28 Jan 2013 14:00:21 +0000 (15:00 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 28 Jan 2013 14:00:21 +0000 (15:00 +0100)
shader_hlsl.h

index 20770d187a3f108f57737ec630042762ffb09831..eca8ded73494bfa9a9f058e6564f535713af477d 100644 (file)
 "\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"