aboutsummaryrefslogtreecommitdiff
path: root/mp/src/materialsystem/stdshaders/unlitgeneric_lightingonly_vs11.fxc
diff options
context:
space:
mode:
Diffstat (limited to 'mp/src/materialsystem/stdshaders/unlitgeneric_lightingonly_vs11.fxc')
-rw-r--r--mp/src/materialsystem/stdshaders/unlitgeneric_lightingonly_vs11.fxc47
1 files changed, 47 insertions, 0 deletions
diff --git a/mp/src/materialsystem/stdshaders/unlitgeneric_lightingonly_vs11.fxc b/mp/src/materialsystem/stdshaders/unlitgeneric_lightingonly_vs11.fxc
new file mode 100644
index 00000000..dcbd43a2
--- /dev/null
+++ b/mp/src/materialsystem/stdshaders/unlitgeneric_lightingonly_vs11.fxc
@@ -0,0 +1,47 @@
+// DYNAMIC: "DOWATERFOG" "0..1"
+// DYNAMIC: "SKINNING" "0..1"
+
+#include "common_vs_fxc.h"
+
+static const int g_FogType = DOWATERFOG;
+static const bool g_bSkinning = SKINNING ? true : false;
+
+struct VS_INPUT
+{
+ float4 vPos : POSITION;
+ float4 vBoneWeights : BLENDWEIGHT;
+ float4 vBoneIndices : BLENDINDICES;
+};
+
+struct VS_OUTPUT
+{
+ float4 vProjPos : POSITION;
+
+ float4 vDiffuse : COLOR0;
+
+ float4 fogFactorW : COLOR1;
+
+#if !defined( _X360 )
+ float fog : FOG;
+#endif
+};
+
+
+VS_OUTPUT main( const VS_INPUT v )
+{
+ VS_OUTPUT o = ( VS_OUTPUT )0;
+
+ float3 worldPos;
+ SkinPosition( g_bSkinning, v.vPos, v.vBoneWeights, v.vBoneIndices, worldPos );
+
+ o.vProjPos = mul( float4( worldPos, 1 ), cViewProj );
+
+ o.fogFactorW = CalcFog( worldPos, o.vProjPos, g_FogType );
+#if !defined( _X360 )
+ o.fog = o.fogFactorW;
+#endif
+
+ o.vDiffuse = 1.0f;
+
+ return o;
+} \ No newline at end of file