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/LightmappedGeneric_BaseTexture.vsh | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'materialsystem/stdshaders/LightmappedGeneric_BaseTexture.vsh')
| -rw-r--r-- | materialsystem/stdshaders/LightmappedGeneric_BaseTexture.vsh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/materialsystem/stdshaders/LightmappedGeneric_BaseTexture.vsh b/materialsystem/stdshaders/LightmappedGeneric_BaseTexture.vsh new file mode 100644 index 0000000..6cef1e5 --- /dev/null +++ b/materialsystem/stdshaders/LightmappedGeneric_BaseTexture.vsh @@ -0,0 +1,38 @@ +vs.1.1 + +# DYNAMIC: "DOWATERFOG" "0..1" + +#include "macros.vsh" + +;------------------------------------------------------------------------------ +; Vertex blending +;------------------------------------------------------------------------------ + +&AllocateRegister( \$projPos ); + +dp4 $projPos.x, $vPos, $cModelViewProj0 +dp4 $projPos.y, $vPos, $cModelViewProj1 +dp4 $projPos.z, $vPos, $cModelViewProj2 +dp4 $projPos.w, $vPos, $cModelViewProj3 +mov oPos, $projPos + +alloc $worldPos +if( $DOWATERFOG == 1 ) +{ + ; Get the worldpos z component only since that's all we need for height fog + dp4 $worldPos.z, $vPos, $cModel2 +} +&CalcFog( $worldPos, $projPos ); +free $worldPos + +&FreeRegister( \$projPos ); + +;------------------------------------------------------------------------------ +; Texture coordinates +;------------------------------------------------------------------------------ + +dp4 oT0.x, $vTexCoord0, $SHADER_SPECIFIC_CONST_0 +dp4 oT0.y, $vTexCoord0, $SHADER_SPECIFIC_CONST_1 + + + |