diff options
Diffstat (limited to 'sp/src/materialsystem/stdshaders/lightmappedgeneric_lightingonly_vs11.fxc')
| -rw-r--r-- | sp/src/materialsystem/stdshaders/lightmappedgeneric_lightingonly_vs11.fxc | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/sp/src/materialsystem/stdshaders/lightmappedgeneric_lightingonly_vs11.fxc b/sp/src/materialsystem/stdshaders/lightmappedgeneric_lightingonly_vs11.fxc new file mode 100644 index 00000000..afee6c9c --- /dev/null +++ b/sp/src/materialsystem/stdshaders/lightmappedgeneric_lightingonly_vs11.fxc @@ -0,0 +1,51 @@ +// DYNAMIC: "DOWATERFOG" "0..1" + +#include "common_vs_fxc.h" + +static const int g_FogType = DOWATERFOG; + +struct VS_INPUT +{ + float4 vPos : POSITION; + float2 vTexCoord1 : TEXCOORD1; +}; + +struct VS_OUTPUT +{ + float4 vProjPos : POSITION; + + float2 vTexCoord0 : TEXCOORD0; + float2 vTexCoord1 : TEXCOORD1; + + 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; + worldPos = mul4x3( v.vPos, cModel[0] ); + + o.vProjPos = mul( float4( worldPos, 1 ), cViewProj ); + + o.fogFactorW = CalcFog( worldPos, o.vProjPos, g_FogType ); +#if !defined( _X360 ) + o.fog = o.fogFactorW; +#endif + + // YUCK! This is to make texcoords continuous for mat_softwaretl + o.vTexCoord0 = 0.0f; + o.vTexCoord1 = v.vTexCoord1; + + o.vDiffuse = 1.0f; + + return o; +}
\ No newline at end of file |