summaryrefslogtreecommitdiff
path: root/materialsystem/stdshaders/compositor_vs20.fxc
diff options
context:
space:
mode:
Diffstat (limited to 'materialsystem/stdshaders/compositor_vs20.fxc')
-rw-r--r--materialsystem/stdshaders/compositor_vs20.fxc41
1 files changed, 41 insertions, 0 deletions
diff --git a/materialsystem/stdshaders/compositor_vs20.fxc b/materialsystem/stdshaders/compositor_vs20.fxc
new file mode 100644
index 0000000..bb9c6be
--- /dev/null
+++ b/materialsystem/stdshaders/compositor_vs20.fxc
@@ -0,0 +1,41 @@
+//======= Copyright � 1996-2007, Valve Corporation, All rights reserved. ======
+
+#include "common_vs_fxc.h"
+
+// This could be packed more efficiently if needed.
+const float4x2 cXformTexCoord0 : register( c2 );
+const float4x2 cXformTexCoord1 : register( c4 );
+const float4x2 cXformTexCoord2 : register( c6 );
+const float4x2 cXformTexCoord3 : register( c8 );
+
+struct VS_INPUT
+{
+ float3 vPos : POSITION;
+ float2 vBaseTexCoord : TEXCOORD0;
+};
+
+struct VS_OUTPUT
+{
+ float4 projPos : POSITION;
+ float4 texCoord01 : TEXCOORD0;
+ float4 texCoord23 : TEXCOORD1;
+};
+
+#define texCoord0 texCoord01.xy
+#define texCoord1 texCoord01.zw
+#define texCoord2 texCoord23.xy
+#define texCoord3 texCoord23.zw
+
+VS_OUTPUT main( const VS_INPUT v )
+{
+ VS_OUTPUT o = ( VS_OUTPUT )0;
+
+ o.projPos = float4( v.vPos, 1.0f );
+
+ o.texCoord0 = mul( float3( v.vBaseTexCoord, 1 ), (float3x2)cXformTexCoord0 );
+ o.texCoord1 = mul( float3( v.vBaseTexCoord, 1 ), (float3x2)cXformTexCoord1 );
+ o.texCoord2 = mul( float3( v.vBaseTexCoord, 1 ), (float3x2)cXformTexCoord2 );
+ o.texCoord3 = mul( float3( v.vBaseTexCoord, 1 ), (float3x2)cXformTexCoord3 );
+
+ return o;
+}