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/LightingOnly.vsh | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'materialsystem/stdshaders/LightingOnly.vsh')
| -rw-r--r-- | materialsystem/stdshaders/LightingOnly.vsh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/materialsystem/stdshaders/LightingOnly.vsh b/materialsystem/stdshaders/LightingOnly.vsh new file mode 100644 index 0000000..c0f1b90 --- /dev/null +++ b/materialsystem/stdshaders/LightingOnly.vsh @@ -0,0 +1,40 @@ +vs.1.1 + +# STATIC: "HALF_LAMBERT" "0..1" +# DYNAMIC: "DOWATERFOG" "0..1" +# DYNAMIC: "LIGHT_COMBO" "0..21" +# DYNAMIC: "SKINNING" "0..1" + +#include "macros.vsh" + +;------------------------------------------------------------------------------ +; Vertex blending +;------------------------------------------------------------------------------ +&AllocateRegister( \$worldPos ); +&AllocateRegister( \$worldNormal ); +&SkinPositionAndNormal( $worldPos, $worldNormal ); + +;------------------------------------------------------------------------------ +; Transform the position from model to proj +;------------------------------------------------------------------------------ + +&AllocateRegister( \$projPos ); + +dp4 $projPos.x, $worldPos, $cViewProj0 +dp4 $projPos.y, $worldPos, $cViewProj1 +dp4 $projPos.z, $worldPos, $cViewProj2 +dp4 $projPos.w, $worldPos, $cViewProj3 +mov oPos, $projPos + +&CalcFog( $worldPos, $projPos ); + +&FreeRegister( \$projPos ); + +;------------------------------------------------------------------------------ +; Lighting +;------------------------------------------------------------------------------ +&DoLighting( $worldPos, $worldNormal ); + +&FreeRegister( \$worldPos ); +&FreeRegister( \$worldNormal ); + |