diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /materialsystem/stdshaders/overlay_fit_vs11.vsh | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'materialsystem/stdshaders/overlay_fit_vs11.vsh')
| -rw-r--r-- | materialsystem/stdshaders/overlay_fit_vs11.vsh | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/materialsystem/stdshaders/overlay_fit_vs11.vsh b/materialsystem/stdshaders/overlay_fit_vs11.vsh new file mode 100644 index 0000000..eb51f55 --- /dev/null +++ b/materialsystem/stdshaders/overlay_fit_vs11.vsh @@ -0,0 +1,55 @@ +vs.1.1 + +# DYNAMIC: "DOWATERFOG" "0..1" + +;------------------------------------------------------------------------------ +; Constants specified by the app +; c0 = (0, 1, 2, 0.5) +; c1 = (1/2.2, 0, 0, 0) +; c2 = camera position *in world space* +; c4-c7 = modelViewProj matrix (transpose) +; c8-c11 = ViewProj matrix (transpose) +; c12-c15 = model->view matrix (transpose) +; c16 = [fogStart, fogEnd, fogRange, undefined] +; +; Vertex components (as specified in the vertex DECL) +; $vPos = Position +; $vTexCoord0.xy = TexCoord0 +;------------------------------------------------------------------------------ + +#include "macros.vsh" + +; Vertex components +; $vPos = Position +; $vNormal = normal +; $vTexCoord0.xy = TexCoord0 +; $vTangentS = S axis of Texture space +; $vTangentT = T axis of Texture space + +;------------------------------------------------------------------------------ +; Transform the position from world to view space +;------------------------------------------------------------------------------ + +alloc $worldPos +alloc $projPos + + +; Transform position from world to projection space +dp4 $projPos.x, $vPos, $cViewProj0 +dp4 $projPos.y, $vPos, $cViewProj1 +dp4 $projPos.z, $vPos, $cViewProj2 +dp4 $projPos.w, $vPos, $cViewProj3 +mov oPos, $projPos + +dp4 $worldPos.z, $vPos, $cModel2 +&CalcFog( $worldPos, $projPos ); + +free $projPos +free $worldPos + + +mov oD0, $vColor + +mov oT0, $vTexCoord0 +mov oT1, $vTexCoord1 +mov oT2, $vTexCoord2 |