summaryrefslogtreecommitdiff
path: root/materialsystem/stdshaders/VertexLitGeneric_SelfIllumOnly.vsh
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /materialsystem/stdshaders/VertexLitGeneric_SelfIllumOnly.vsh
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'materialsystem/stdshaders/VertexLitGeneric_SelfIllumOnly.vsh')
-rw-r--r--materialsystem/stdshaders/VertexLitGeneric_SelfIllumOnly.vsh41
1 files changed, 41 insertions, 0 deletions
diff --git a/materialsystem/stdshaders/VertexLitGeneric_SelfIllumOnly.vsh b/materialsystem/stdshaders/VertexLitGeneric_SelfIllumOnly.vsh
new file mode 100644
index 0000000..40eb8d2
--- /dev/null
+++ b/materialsystem/stdshaders/VertexLitGeneric_SelfIllumOnly.vsh
@@ -0,0 +1,41 @@
+vs.1.1
+
+# DYNAMIC: "DOWATERFOG" "0..1"
+# DYNAMIC: "SKINNING" "0..1"
+
+#include "macros.vsh"
+
+;------------------------------------------------------------------------------
+; Vertex blending
+;------------------------------------------------------------------------------
+&AllocateRegister( \$worldPos );
+&SkinPosition( $worldPos );
+
+;------------------------------------------------------------------------------
+; Transform the position from world to view space
+;------------------------------------------------------------------------------
+
+&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
+
+;------------------------------------------------------------------------------
+; Fog
+;------------------------------------------------------------------------------
+
+&CalcFog( $worldPos, $projPos );
+&FreeRegister( \$projPos );
+&FreeRegister( \$worldPos );
+
+;------------------------------------------------------------------------------
+; Texture coordinates
+;------------------------------------------------------------------------------
+
+dp4 oT0.x, $vTexCoord0, $SHADER_SPECIFIC_CONST_0
+dp4 oT0.y, $vTexCoord0, $SHADER_SPECIFIC_CONST_1
+
+