]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
order postprocess code properly (so blur does not cancel bloom)
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 8 May 2013 10:41:01 +0000 (10:41 +0000)
committerRudolf Polzer <divverent@xonotic.org>
Wed, 8 May 2013 10:45:49 +0000 (12:45 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11949 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=62bfc1df52ea36f582e336efed674885dec74d7b

shader_glsl.h
shader_hlsl.h

index 63540fc8cb306297ae8075d2763e40230a110ebd..b8a441b0a4c3b5fd96761ff80c69d2a316ad1d87 100644 (file)
 "void main(void)\n",
 "{\n",
 "      dp_FragColor = dp_texture2D(Texture_First, TexCoord1);\n",
-"#ifdef USEBLOOM\n",
-"      dp_FragColor += max(vec4(0,0,0,0), dp_texture2D(Texture_Second, TexCoord2) - BloomColorSubtract);\n",
-"#endif\n",
-"#ifdef USEVIEWTINT\n",
-"      dp_FragColor = mix(dp_FragColor, ViewTintColor, ViewTintColor.a);\n",
-"#endif\n",
 "\n",
 "#ifdef USEPOSTPROCESSING\n",
 "// do r_glsl_dumpshader, edit glsl/default.glsl, and replace this by your own postprocessing if you want\n",
 "      dp_FragColor.rgb = dp_FragColor.rgb * (1.0 + UserVec2.x) + vec3(max(0.0, sobel - UserVec2.z))*UserVec2.y;\n",
 "#endif\n",
 "\n",
+"#ifdef USEBLOOM\n",
+"      dp_FragColor += max(vec4(0,0,0,0), dp_texture2D(Texture_Second, TexCoord2) - BloomColorSubtract);\n",
+"#endif\n",
+"\n",
+"#ifdef USEVIEWTINT\n",
+"      dp_FragColor = mix(dp_FragColor, ViewTintColor, ViewTintColor.a);\n",
+"#endif\n",
+"\n",
 "#ifdef USESATURATION\n",
 "      //apply saturation BEFORE gamma ramps, so v_glslgamma value does not matter\n",
 "      float y = dot(dp_FragColor.rgb, vec3(0.299, 0.587, 0.114));\n",
index 3e6324d6b5039e2ad74812861b2d164e95d25dac..7881aa6a4980f02cd7ea9a93d9fe480c48641809 100644 (file)
 ")\n",
 "{\n",
 "      dp_FragColor = tex2D(Texture_First, TexCoord1);\n",
-"#ifdef USEBLOOM\n",
-"      dp_FragColor += max(float4(0,0,0,0), tex2D(Texture_Second, TexCoord2) - BloomColorSubtract);\n",
-"#endif\n",
-"#ifdef USEVIEWTINT\n",
-"      dp_FragColor = lerp(dp_FragColor, ViewTintColor, ViewTintColor.a);\n",
-"#endif\n",
 "\n",
 "#ifdef USEPOSTPROCESSING\n",
 "// do r_glsl_dumpshader, edit glsl/default.glsl, and replace this by your own postprocessing if you want\n",
 "      dp_FragColor.rgb = dp_FragColor.rgb * (1.0 + UserVec2.x) + float3(1,1,1)*max(0.0, sobel - UserVec2.z)*UserVec2.y;\n",
 "#endif\n",
 "\n",
+"#ifdef USEBLOOM\n",
+"      dp_FragColor += max(float4(0,0,0,0), tex2D(Texture_Second, TexCoord2) - BloomColorSubtract);\n",
+"#endif\n",
+"\n",
+"#ifdef USEVIEWTINT\n",
+"      dp_FragColor = lerp(dp_FragColor, ViewTintColor, ViewTintColor.a);\n",
+"#endif\n",
+"\n",
 "#ifdef USESATURATION\n",
 "      //apply saturation BEFORE gamma ramps, so v_glslgamma value does not matter\n",
 "      float y = dot(dp_FragColor.rgb, float3(0.299, 0.587, 0.114));\n",