aboutsummaryrefslogtreecommitdiff
path: root/sp/src/materialsystem/stdshaders/SDK_Bloom_ps2x.fxc
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-07-30 15:10:15 -0700
committerJoe Ludwig <[email protected]>2013-07-30 15:10:15 -0700
commitd9ac276a957034bba99d71c1ecbfb53c3d2d1c87 (patch)
treeac1d618bc96127fcc03cc7c6f493043ca30c5564 /sp/src/materialsystem/stdshaders/SDK_Bloom_ps2x.fxc
parentRevised the contribution guidelines to encourage more interaction within the ... (diff)
downloadsource-sdk-2013-d9ac276a957034bba99d71c1ecbfb53c3d2d1c87.tar.xz
source-sdk-2013-d9ac276a957034bba99d71c1ecbfb53c3d2d1c87.zip
Added bloom shader and screenspace effect helpers as examples for the SDK.
Diffstat (limited to 'sp/src/materialsystem/stdshaders/SDK_Bloom_ps2x.fxc')
-rw-r--r--sp/src/materialsystem/stdshaders/SDK_Bloom_ps2x.fxc21
1 files changed, 21 insertions, 0 deletions
diff --git a/sp/src/materialsystem/stdshaders/SDK_Bloom_ps2x.fxc b/sp/src/materialsystem/stdshaders/SDK_Bloom_ps2x.fxc
new file mode 100644
index 00000000..82a386ae
--- /dev/null
+++ b/sp/src/materialsystem/stdshaders/SDK_Bloom_ps2x.fxc
@@ -0,0 +1,21 @@
+// STATIC: "CONVERT_TO_SRGB" "0..1" [ps20b][= g_pHardwareConfig->NeedsShaderSRGBConversion()] [PC]
+// STATIC: "CONVERT_TO_SRGB" "0..0" [= 0] [XBOX]
+
+#define HDRTYPE HDR_TYPE_NONE
+#include "common_ps_fxc.h"
+
+sampler FBSampler : register( s0 );
+sampler BlurSampler : register( s1 );
+
+struct PS_INPUT
+{
+ float2 texCoord : TEXCOORD0;
+};
+
+float4 main( PS_INPUT i ) : COLOR
+{
+ float4 fbSample = tex2D( FBSampler, i.texCoord );
+ float4 blurSample = tex2D( BlurSampler, i.texCoord );
+
+ return FinalOutput( float4( fbSample + blurSample.rgb * blurSample.a * MAX_HDR_OVERBRIGHT, 1.0f ), 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE );
+} \ No newline at end of file