aboutsummaryrefslogtreecommitdiff
path: root/mp/src/materialsystem/stdshaders/SDK_screenspaceeffect_vs20.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 /mp/src/materialsystem/stdshaders/SDK_screenspaceeffect_vs20.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 'mp/src/materialsystem/stdshaders/SDK_screenspaceeffect_vs20.fxc')
-rw-r--r--mp/src/materialsystem/stdshaders/SDK_screenspaceeffect_vs20.fxc47
1 files changed, 47 insertions, 0 deletions
diff --git a/mp/src/materialsystem/stdshaders/SDK_screenspaceeffect_vs20.fxc b/mp/src/materialsystem/stdshaders/SDK_screenspaceeffect_vs20.fxc
new file mode 100644
index 00000000..eec88ba2
--- /dev/null
+++ b/mp/src/materialsystem/stdshaders/SDK_screenspaceeffect_vs20.fxc
@@ -0,0 +1,47 @@
+//========= Copyright � 1996-2006, Valve Corporation, All rights reserved. ============//
+
+// STATIC: "X360APPCHOOSER" "0..1" [= 0]
+
+#include "common_vs_fxc.h"
+
+struct VS_INPUT
+{
+ float3 vPos : POSITION;
+ float2 vBaseTexCoord : TEXCOORD0;
+
+ #if X360APPCHOOSER
+ float4 vColor : COLOR0;
+ #endif
+};
+
+struct VS_OUTPUT
+{
+ float4 projPos : POSITION;
+ float2 baseTexCoord : TEXCOORD0;
+ float2 ZeroTexCoord : TEXCOORD1;
+ float2 bloomTexCoord : TEXCOORD2;
+
+ #if X360APPCHOOSER
+ float4 vColor : TEXCOORD3;
+ #endif
+};
+
+float4 Texel_Sizes : register (SHADER_SPECIFIC_CONST_0);
+
+VS_OUTPUT main( const VS_INPUT v )
+{
+ VS_OUTPUT o = ( VS_OUTPUT )0;
+
+ o.projPos = float4( v.vPos, 1.0f );
+ o.baseTexCoord = v.vBaseTexCoord;
+ o.ZeroTexCoord=float2(0,0);
+ o.bloomTexCoord.x=v.vBaseTexCoord.x+Texel_Sizes.z;
+ o.bloomTexCoord.y=v.vBaseTexCoord.y+Texel_Sizes.w;
+
+ #if X360APPCHOOSER
+ o.vColor.rgba = v.vColor.rgba;
+ o.projPos.xyzw = mul( float4( v.vPos.xyz, 1.0f ), cModelViewProj );
+ #endif
+
+ return o;
+}