summaryrefslogtreecommitdiff
path: root/materialsystem/stdshaders/shadow_ps14.psh
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/shadow_ps14.psh
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'materialsystem/stdshaders/shadow_ps14.psh')
-rw-r--r--materialsystem/stdshaders/shadow_ps14.psh28
1 files changed, 28 insertions, 0 deletions
diff --git a/materialsystem/stdshaders/shadow_ps14.psh b/materialsystem/stdshaders/shadow_ps14.psh
new file mode 100644
index 0000000..a71df83
--- /dev/null
+++ b/materialsystem/stdshaders/shadow_ps14.psh
@@ -0,0 +1,28 @@
+ps.1.4
+
+def c0, 1.0f, 1.0f, 1.0f, 1.0f
+def c2, 0.2f, 0.2f, 0.2f, 0.2f
+
+texld r0, t0
+texld r1, t1
+texld r2, t2
+texld r3, t3
+texld r4, t4
+
+// The mul has to happen here first because we overflow otherwise
+mul r0.r, r0.a, c2.a
+mad r0.r, r1.a, c2.a, r0.r
+mad r0.r, r2.a, c2.a, r0.r
+mad r0.r, r3.a, c2.a, r0.r
+mad r0.r, r4.a, c2.a, r0.r
+
+; To accomplish shadow fading, subtract vertex alpha from texture alpha
+; color channel isn't used...
+sub_sat r0.a, r0.r, v0.a
+
+; Blend between white and the constant color...
+lrp r0.rgba, 1-r0.a, c0, c1
+
+
+
+