summaryrefslogtreecommitdiff
path: root/materialsystem/stdshaders/fillrate.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/fillrate.vsh
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'materialsystem/stdshaders/fillrate.vsh')
-rw-r--r--materialsystem/stdshaders/fillrate.vsh35
1 files changed, 35 insertions, 0 deletions
diff --git a/materialsystem/stdshaders/fillrate.vsh b/materialsystem/stdshaders/fillrate.vsh
new file mode 100644
index 0000000..917e316
--- /dev/null
+++ b/materialsystem/stdshaders/fillrate.vsh
@@ -0,0 +1,35 @@
+vs.1.1
+
+# DYNAMIC: "DOWATERFOG" "0..1"
+# DYNAMIC: "SKINNING" "0..1"
+
+;------------------------------------------------------------------------------
+; Constants specified by the app
+; c0 = (0, 1, 2, 0.5)
+; c1 = (1/2.2, 3, 255, overbright factor)
+; 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, 1.0/fogRange]
+; $SHADER_SPECIFIC_CONST_0-$SHADER_SPECIFIC_CONST_1 = Base texture transform
+; $SHADER_SPECIFIC_CONST_2-$SHADER_SPECIFIC_CONST_3 = Mask texture transform
+;------------------------------------------------------------------------------
+
+#include "macros.vsh"
+
+;------------------------------------------------------------------------------
+; Vertex blending
+;------------------------------------------------------------------------------
+
+&AllocateRegister( \$worldPos );
+&SkinPosition( $worldPos );
+
+; Transform the position from world to view space
+dp4 oPos.x, $worldPos, $cViewProj0
+dp4 oPos.y, $worldPos, $cViewProj1
+dp4 oPos.z, $worldPos, $cViewProj2
+dp4 oPos.w, $worldPos, $cViewProj3
+
+
+&FreeRegister( \$worldPos );