mirror of
https://github.com/celisej567/cool-source-archive.git
synced 2026-09-15 20:09:19 +03:00
42 lines
880 B
Plaintext
42 lines
880 B
Plaintext
// DYNAMIC: "DOWATERFOG" "0..0"
|
|
|
|
#include "common_vs_fxc.h"
|
|
#include "common_cbuffers_fxc.h"
|
|
|
|
CBUFFER_PERFRAME(register(b1))
|
|
CBUFFER_PERSCENE(register(b2))
|
|
|
|
|
|
static const int g_FogType = DOWATERFOG;
|
|
|
|
struct VS_INPUT
|
|
{
|
|
float4 vPos : POSITION;
|
|
float4 vTexCoord0 : TEXCOORD0;
|
|
};
|
|
|
|
struct VS_OUTPUT
|
|
{
|
|
float4 projPos : SV_POSITION; // Projection-space position
|
|
//float fog : FOG;
|
|
HALF2 baseTexCoord : TEXCOORD0; // Base texture coordinate
|
|
//float4 worldPos_projPosZ : TEXCOORD1; // Necessary for water fog dest alpha
|
|
//float4 fogFactorW : COLOR1;
|
|
};
|
|
|
|
VS_OUTPUT main( const VS_INPUT v )
|
|
{
|
|
VS_OUTPUT o = ( VS_OUTPUT )0;
|
|
|
|
float4x4 viewProj = mul(cViewMatrix, cProjMatrix);
|
|
|
|
// Transform into projection space
|
|
float4 projPos = mul(float4(v.vPos.xyz, 1), viewProj);
|
|
o.projPos = projPos;
|
|
|
|
o.baseTexCoord.xy = v.vTexCoord0;
|
|
return o;
|
|
}
|
|
|
|
|