aboutsummaryrefslogtreecommitdiff
path: root/sp/src/materialsystem/stdshaders
diff options
context:
space:
mode:
authorMichael Sartain <[email protected]>2014-10-02 08:25:55 -0700
committerMichael Sartain <[email protected]>2014-10-02 08:25:55 -0700
commit55ed12f8d1eb6887d348be03aee5573d44177ffb (patch)
tree3686f7ca78c780cd9a3d367b79a9d9250c1be7c0 /sp/src/materialsystem/stdshaders
parent* Added support for Visual C++ 2013 Express to VPC (diff)
downloadsource-sdk-2013-55ed12f8d1eb6887d348be03aee5573d44177ffb.tar.xz
source-sdk-2013-55ed12f8d1eb6887d348be03aee5573d44177ffb.zip
Updated the SDK with the latest code from the TF and HL2 branches.
Diffstat (limited to 'sp/src/materialsystem/stdshaders')
-rw-r--r--sp/src/materialsystem/stdshaders/BlurFilter_ps11.psh36
-rw-r--r--sp/src/materialsystem/stdshaders/Cable.psh54
-rw-r--r--sp/src/materialsystem/stdshaders/Eyes.psh32
-rw-r--r--sp/src/materialsystem/stdshaders/Eyes_Overbright2.psh36
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric.psh30
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_AddBaseAlphaMaskedEnvMap.psh34
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_AddEnvMapMaskNoTexture.psh34
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_AddEnvMapNoTexture.psh30
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_BaseAlphaMaskedEnvMapV2.psh44
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_BaseTexture.psh28
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedEnvmap.psh132
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedEnvmap_ps14.psh144
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedLightmap.psh158
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedLightmap_base_ps14.psh78
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedLightmap_blend_ps14.psh94
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_Decal.psh94
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_Detail.psh36
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_DetailNoTexture.psh32
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_DetailSelfIlluminated.psh46
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_EnvMapNoTexture.psh42
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_EnvMapV2.psh40
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_LightingOnly_Overbright2.psh12
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_MaskedEnvMapNoTexture.psh48
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_MaskedEnvMapV2.psh44
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_MultiplyByLighting.psh40
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_MultiplyByLightingNoTexture.psh40
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_MultiplyByLightingSelfIllum.psh46
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_NoTexture.psh28
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_SSBumpmappedLightmap.psh68
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_SelfIlluminated.psh42
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_SelfIlluminatedEnvMapV2.psh54
-rw-r--r--sp/src/materialsystem/stdshaders/LightmappedGeneric_SelfIlluminatedMaskedEnvMapV2.psh56
-rw-r--r--sp/src/materialsystem/stdshaders/Refract_ps11.psh72
-rw-r--r--sp/src/materialsystem/stdshaders/ShadowModel.psh44
-rw-r--r--sp/src/materialsystem/stdshaders/UnlitGeneric.psh24
-rw-r--r--sp/src/materialsystem/stdshaders/UnlitGeneric_BaseAlphaMaskedEnvMap.psh38
-rw-r--r--sp/src/materialsystem/stdshaders/UnlitGeneric_Detail.psh28
-rw-r--r--sp/src/materialsystem/stdshaders/UnlitGeneric_DetailBaseAlphaMaskedEnvMap.psh58
-rw-r--r--sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMap.psh50
-rw-r--r--sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMapMask.psh58
-rw-r--r--sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMapMaskNoTexture.psh40
-rw-r--r--sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMapNoTexture.psh36
-rw-r--r--sp/src/materialsystem/stdshaders/UnlitGeneric_DetailNoTexture.psh18
-rw-r--r--sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMap.psh34
-rw-r--r--sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMapMask.psh38
-rw-r--r--sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMapMaskNoTexture.psh34
-rw-r--r--sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMapNoTexture.psh30
-rw-r--r--sp/src/materialsystem/stdshaders/UnlitGeneric_NoTexture.psh14
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric.psh26
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_BaseAlphaMaskedEnvMapV2.psh34
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_BlendTint.psh34
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail.psh32
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailBaseAlphaMaskedEnvMapV2.psh36
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailEnvMapV2.psh32
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailMaskedEnvMapV2.psh36
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailNoTexture.psh24
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailSelfIlluminated.psh44
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailSelfIlluminatedEnvMapV2.psh48
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailSelfIlluminatedMaskedEnvMapV2.psh52
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail_LerpBase.psh30
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail_additive.psh30
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail_additive_selfillum.psh30
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvMapNoTexture.psh28
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvMapV2.psh28
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2.psh72
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2_MultByAlpha.psh84
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2_MultByAlpha_ps14.psh84
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2_ps14.psh78
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_MaskedEnvMapNoTexture.psh30
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_MaskedEnvMapV2.psh32
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_NoTexture.psh18
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIllumOnly.psh10
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIlluminated.psh38
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIlluminatedEnvMapV2.psh42
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIlluminatedMaskedEnvMapV2.psh46
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitTexture.psh30
-rw-r--r--sp/src/materialsystem/stdshaders/VertexLitTexture_Overbright2.psh32
-rw-r--r--sp/src/materialsystem/stdshaders/WaterCheapFresnelOpaque_ps14.psh78
-rw-r--r--sp/src/materialsystem/stdshaders/WaterCheapFresnel_ps14.psh78
-rw-r--r--sp/src/materialsystem/stdshaders/WaterCheapNoFresnelOpaque_ps11.psh38
-rw-r--r--sp/src/materialsystem/stdshaders/WaterCheapNoFresnel_ps11.psh36
-rw-r--r--sp/src/materialsystem/stdshaders/WaterCheapOpaque_ps11.psh52
-rw-r--r--sp/src/materialsystem/stdshaders/WaterCheapOpaque_ps14.psh62
-rw-r--r--sp/src/materialsystem/stdshaders/WaterCheap_ps11.psh52
-rw-r--r--sp/src/materialsystem/stdshaders/WaterCheap_ps14.psh60
-rw-r--r--sp/src/materialsystem/stdshaders/WaterReflect_ps11.psh52
-rw-r--r--sp/src/materialsystem/stdshaders/WaterRefractFresnel_ps11.psh48
-rw-r--r--sp/src/materialsystem/stdshaders/WaterRefract_ps11.psh26
-rw-r--r--sp/src/materialsystem/stdshaders/Water_ps14.psh192
-rw-r--r--sp/src/materialsystem/stdshaders/WorldTexture.psh28
-rw-r--r--sp/src/materialsystem/stdshaders/WorldTwoTextureBlend.psh42
-rw-r--r--sp/src/materialsystem/stdshaders/WorldTwoTextureBlend_DetailAlpha.psh50
-rw-r--r--sp/src/materialsystem/stdshaders/WorldTwoTextureBlend_SelfIlluminated.psh54
-rw-r--r--sp/src/materialsystem/stdshaders/WorldVertexAlpha.psh20
-rw-r--r--sp/src/materialsystem/stdshaders/WorldVertexTransition.psh36
-rw-r--r--sp/src/materialsystem/stdshaders/WorldVertexTransition_BlendBase2.psh32
-rw-r--r--sp/src/materialsystem/stdshaders/WorldVertexTransition_Editor.psh20
-rw-r--r--sp/src/materialsystem/stdshaders/WorldVertexTransition_Seamless.psh46
-rw-r--r--sp/src/materialsystem/stdshaders/WorldVertexTransition_ps14.psh64
-rw-r--r--sp/src/materialsystem/stdshaders/cloud_ps11.psh12
-rw-r--r--sp/src/materialsystem/stdshaders/detail_ps11.psh24
-rw-r--r--sp/src/materialsystem/stdshaders/eyes_flashlight2_ps11.psh34
-rw-r--r--sp/src/materialsystem/stdshaders/flesh_interior_blended_pass_dx8_ps11.psh30
-rw-r--r--sp/src/materialsystem/stdshaders/lightmappedgeneric_basealphamaskedenvmap.psh44
-rw-r--r--sp/src/materialsystem/stdshaders/lightmappedgeneric_basetextureblend.psh18
-rw-r--r--sp/src/materialsystem/stdshaders/lightmappedgeneric_envmap.psh40
-rw-r--r--sp/src/materialsystem/stdshaders/lightmappedgeneric_maskedenvmap.psh44
-rw-r--r--sp/src/materialsystem/stdshaders/lightmappedgeneric_multiplybylightingbasealphamaskedselfillum.psh48
-rw-r--r--sp/src/materialsystem/stdshaders/lightmappedgeneric_multiplybylightingbasenotexture.psh40
-rw-r--r--sp/src/materialsystem/stdshaders/lightmappedgeneric_selfilluminatedenvmap.psh54
-rw-r--r--sp/src/materialsystem/stdshaders/lightmappedgeneric_selfilluminatedmaskedenvmap.psh54
-rw-r--r--sp/src/materialsystem/stdshaders/sprite_ps11.psh28
-rw-r--r--sp/src/materialsystem/stdshaders/unlitgeneric_basetimesdetail.psh48
-rw-r--r--sp/src/materialsystem/stdshaders/vertexlit_notexture.psh26
-rw-r--r--sp/src/materialsystem/stdshaders/vertexlitgeneric_basealphamaskedenvmap.psh38
-rw-r--r--sp/src/materialsystem/stdshaders/vertexlitgeneric_detailbasealphamaskedenvmap.psh42
-rw-r--r--sp/src/materialsystem/stdshaders/vertexlitgeneric_detailenvmap.psh38
-rw-r--r--sp/src/materialsystem/stdshaders/vertexlitgeneric_detailmaskedenvmap.psh42
-rw-r--r--sp/src/materialsystem/stdshaders/vertexlitgeneric_detailselfilluminatedenvmap.psh56
-rw-r--r--sp/src/materialsystem/stdshaders/vertexlitgeneric_detailselfilluminatedmaskedenvmap.psh58
-rw-r--r--sp/src/materialsystem/stdshaders/vertexlitgeneric_envmap.psh34
-rw-r--r--sp/src/materialsystem/stdshaders/vertexlitgeneric_lightingonly_overbright2.psh10
-rw-r--r--sp/src/materialsystem/stdshaders/vertexlitgeneric_maskedenvmap.psh38
-rw-r--r--sp/src/materialsystem/stdshaders/vertexlitgeneric_selfilluminatedenvmap.psh50
-rw-r--r--sp/src/materialsystem/stdshaders/vertexlitgeneric_selfilluminatedmaskedenvmap.psh52
-rw-r--r--sp/src/materialsystem/stdshaders/waterreflect_ps14.psh16
-rw-r--r--sp/src/materialsystem/stdshaders/waterrefract_ps14.psh46
127 files changed, 2859 insertions, 2859 deletions
diff --git a/sp/src/materialsystem/stdshaders/BlurFilter_ps11.psh b/sp/src/materialsystem/stdshaders/BlurFilter_ps11.psh
index 6bc9bc57..ee58a650 100644
--- a/sp/src/materialsystem/stdshaders/BlurFilter_ps11.psh
+++ b/sp/src/materialsystem/stdshaders/BlurFilter_ps11.psh
@@ -1,18 +1,18 @@
-ps.1.1
-
-// 1221 filter constants
-def c0, 0.1667f, 0.1667f, 0.1667f, 0.3333f
-
-tex t0
-tex t1
-tex t2
-tex t3
-
-mul r0.rgb, t0, c0
-mad r0.rgb, t1, c0.a, r0
-mad r0.rgb, t2, c0.a, r0
-mad r0.rgb, t3, c0, r0
-
-mul r0.rgb, r0, c1 +
-mov r0.a, t0.a
-
+ps.1.1
+
+// 1221 filter constants
+def c0, 0.1667f, 0.1667f, 0.1667f, 0.3333f
+
+tex t0
+tex t1
+tex t2
+tex t3
+
+mul r0.rgb, t0, c0
+mad r0.rgb, t1, c0.a, r0
+mad r0.rgb, t2, c0.a, r0
+mad r0.rgb, t3, c0, r0
+
+mul r0.rgb, r0, c1 +
+mov r0.a, t0.a
+
diff --git a/sp/src/materialsystem/stdshaders/Cable.psh b/sp/src/materialsystem/stdshaders/Cable.psh
index a73b1130..6ba92636 100644
--- a/sp/src/materialsystem/stdshaders/Cable.psh
+++ b/sp/src/materialsystem/stdshaders/Cable.psh
@@ -1,27 +1,27 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; See the vertex shader for info
-;
-; This shader takes:
-; t0 = normal map
-; t1 = base texture
-; v0 = directional light color
-; t2 = directional light direction (biased into 0-1)
-; c0 = percent of dirlight to add as ambient
-;
-; Output:
-; (t0 dot t1) * v0
-;------------------------------------------------------------------------------
-
-tex t0 ; Get the 3-vector from the normal map
-tex t1 ; Interpret tcoord t1 as color data.
-texcoord t2
-
-dp3 r1, t0_bx2, t2_bx2 ; r1 = normalMap dot dirLightDir
-add r0, r1, c0 ; + 0.5
-
-mul r1, v0, r0 ; scale the dot product by the dirlight's actual color
-mul r0.rgb, r1, t1 + ; scale by the texture color
-
-mul r0.a, t1.a, v0.a
+ps.1.1
+
+;------------------------------------------------------------------------------
+; See the vertex shader for info
+;
+; This shader takes:
+; t0 = normal map
+; t1 = base texture
+; v0 = directional light color
+; t2 = directional light direction (biased into 0-1)
+; c0 = percent of dirlight to add as ambient
+;
+; Output:
+; (t0 dot t1) * v0
+;------------------------------------------------------------------------------
+
+tex t0 ; Get the 3-vector from the normal map
+tex t1 ; Interpret tcoord t1 as color data.
+texcoord t2
+
+dp3 r1, t0_bx2, t2_bx2 ; r1 = normalMap dot dirLightDir
+add r0, r1, c0 ; + 0.5
+
+mul r1, v0, r0 ; scale the dot product by the dirlight's actual color
+mul r0.rgb, r1, t1 + ; scale by the texture color
+
+mul r0.a, t1.a, v0.a
diff --git a/sp/src/materialsystem/stdshaders/Eyes.psh b/sp/src/materialsystem/stdshaders/Eyes.psh
index 6e5e5646..6909dcf6 100644
--- a/sp/src/materialsystem/stdshaders/Eyes.psh
+++ b/sp/src/materialsystem/stdshaders/Eyes.psh
@@ -1,16 +1,16 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw the eyes
-; t0 - texture
-; t1 - iris
-; t2 - glint
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-tex t2
-
-lrp r0, t1.a, t1, t0 ; Blend in the iris with the background
-mad r0.rgb, r0, v0, t2 + ; Modulate by the illumination, add in the glint
-mov r0.a, t0.a
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw the eyes
+; t0 - texture
+; t1 - iris
+; t2 - glint
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+tex t2
+
+lrp r0, t1.a, t1, t0 ; Blend in the iris with the background
+mad r0.rgb, r0, v0, t2 + ; Modulate by the illumination, add in the glint
+mov r0.a, t0.a
diff --git a/sp/src/materialsystem/stdshaders/Eyes_Overbright2.psh b/sp/src/materialsystem/stdshaders/Eyes_Overbright2.psh
index 11119233..f7fae257 100644
--- a/sp/src/materialsystem/stdshaders/Eyes_Overbright2.psh
+++ b/sp/src/materialsystem/stdshaders/Eyes_Overbright2.psh
@@ -1,18 +1,18 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw the eyes
-; t0 - texture
-; t1 - iris
-; t2 - glint
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-tex t2
-
-lrp r0, t1.a, t1, t0 ; Blend in the iris with the background
-mul_x2 r0, v0, r0 ; Modulate by the illumination with overbright
-
-add r0.rgb, r0, t2 + ; Add in the glint
-mov r0.a, t0.a
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw the eyes
+; t0 - texture
+; t1 - iris
+; t2 - glint
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+tex t2
+
+lrp r0, t1.a, t1, t0 ; Blend in the iris with the background
+mul_x2 r0, v0, r0 ; Modulate by the illumination with overbright
+
+add r0.rgb, r0, t2 + ; Add in the glint
+mov r0.a, t0.a
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric.psh
index a6794e7e..6ec78dda 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric.psh
@@ -1,15 +1,15 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-mul r0, t0, v0 ; base times vertex color (with alpha)
-mul r0.rgb, t1, r0 ; fold in lightmap (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+mul r0, t0, v0 ; base times vertex color (with alpha)
+mul r0.rgb, t1, r0 ; fold in lightmap (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_AddBaseAlphaMaskedEnvMap.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_AddBaseAlphaMaskedEnvMap.psh
index 7b042e7a..b31054c5 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_AddBaseAlphaMaskedEnvMap.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_AddBaseAlphaMaskedEnvMap.psh
@@ -1,17 +1,17 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c2 - envmaptint
-;------------------------------------------------------------------------------
-
-tex t2 ; cube map
-tex t3 ; envmap mask
-
-mul r0.rgb, t2, 1-t3.a
-mul r0.rgb, c2, r0 ; apply the envmaptint
-+ mul r0.a, c2.a, v0.a
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c2 - envmaptint
+;------------------------------------------------------------------------------
+
+tex t2 ; cube map
+tex t3 ; envmap mask
+
+mul r0.rgb, t2, 1-t3.a
+mul r0.rgb, c2, r0 ; apply the envmaptint
++ mul r0.a, c2.a, v0.a
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_AddEnvMapMaskNoTexture.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_AddEnvMapMaskNoTexture.psh
index ccc2c7b1..ad09a6d8 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_AddEnvMapMaskNoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_AddEnvMapMaskNoTexture.psh
@@ -1,17 +1,17 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c2 - envmaptint
-;------------------------------------------------------------------------------
-
-tex t2 ; cube map
-tex t3 ; envmap mask
-
-mul r0.rgb, t2, t3
-mul r0.rgb, c2, r0
-+ mul r0.a, c2.a, v0.a
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c2 - envmaptint
+;------------------------------------------------------------------------------
+
+tex t2 ; cube map
+tex t3 ; envmap mask
+
+mul r0.rgb, t2, t3
+mul r0.rgb, c2, r0
++ mul r0.a, c2.a, v0.a
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_AddEnvMapNoTexture.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_AddEnvMapNoTexture.psh
index fd4fd7a5..16b47fef 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_AddEnvMapNoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_AddEnvMapNoTexture.psh
@@ -1,15 +1,15 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c2 - envmaptint
-;------------------------------------------------------------------------------
-
-tex t2 ; cube map
-
-mul r0.rgb, t2, c2
-+ mul r0.a, v0.a, c2.a
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c2 - envmaptint
+;------------------------------------------------------------------------------
+
+tex t2 ; cube map
+
+mul r0.rgb, t2, c2
++ mul r0.a, v0.a, c2.a
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_BaseAlphaMaskedEnvMapV2.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_BaseAlphaMaskedEnvMapV2.psh
index 236db8e3..c8279e74 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_BaseAlphaMaskedEnvMapV2.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_BaseAlphaMaskedEnvMapV2.psh
@@ -1,22 +1,22 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c1 - self-illum tint
-; c2 - envmap tint
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-tex t2
-tex t3
-
-mul r0, t0, v0 ; base times vertex color (with alpha)
-mul r0.rgb, t1, r0 ; fold in lighting (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-mul r1, t2, 1-t3.a ; envmap * envmapmask (alpha)
-mad r0.rgb, r1, c2, r0 ; + envmap * envmapmask * envmaptint (color only)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c1 - self-illum tint
+; c2 - envmap tint
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+tex t2
+tex t3
+
+mul r0, t0, v0 ; base times vertex color (with alpha)
+mul r0.rgb, t1, r0 ; fold in lighting (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+mul r1, t2, 1-t3.a ; envmap * envmapmask (alpha)
+mad r0.rgb, r1, c2, r0 ; + envmap * envmapmask * envmaptint (color only)
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_BaseTexture.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_BaseTexture.psh
index 75aab35b..0401218d 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_BaseTexture.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_BaseTexture.psh
@@ -1,14 +1,14 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-; Get the color from the texture
-tex t0
-mul r0, t0, c0
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+; Get the color from the texture
+tex t0
+mul r0, t0, c0
+
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedEnvmap.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedEnvmap.psh
index ba349187..6f061278 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedEnvmap.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedEnvmap.psh
@@ -1,66 +1,66 @@
-; STATIC: "NORMALMAPALPHAENVMAPMASK" "0..1"
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Environment mapping on a bumped surface
-; t0 - Normalmap
-; t3 - Cube environment map (*must* be a cube map!)
-;
-; c0 - color to multiply the results by
-; c1 - envmap contrast
-; c2 - envmap saturation
-; c3 - grey weights
-; c4 - fresnel amount
-; Input texture coords required here are a little wonky.
-; tc0.uv <- U,V into the normal map
-; tc1.uvw, tc2.uvw, tc3.uvw <- 3x3 matrix transform
-; from tangent space->env map space
-; tc1.q, tc2.q, tc3.q <- eye vector in env map space
-;------------------------------------------------------------------------------
-
-; Get the 3-vector from the normal map
-tex t0
-
-; Perform matrix multiply to get a local normal bump. Then
-; reflect the eye vector through the normal and sample from
-; a cubic environment map.
-texm3x3pad t1, t0_bx2
-texm3x3pad t2, t0_bx2
-texm3x3vspec t3, t0_bx2
-
-; FIXME FIXME - Need to do specialized versions of this with and without:
-; - constant color
-; - fresnel amount of exactly 0 or 1 or in between
-; - envmap contrast of 0, 1, or in between
-; - envmap saturation of 0, 1, or in between
-
-; r0 = constant color * result of bump into envmap
-mul r0.rgb, t3, c0
-
-; dot eye-vector with per-pixel normal from t0
-dp3_sat r1, v0_bx2, t0_bx2
-
-; run Fresnel approx. on it: R0 + (1-R0) (1-cos(q))^5 in alpha channel
-mul r1.rgb, r0, r0 ; color squared
-+mul r0.a, 1-r1.a, 1-r1.a ; squared
-
-lrp r0.rgb, c1, r1, r0 ; blend between color and color * color
-+mul r0.a, r0.a, r0.a ; quartic
-
-dp3 r1.rgb, r0, c3 ; color greyscaled
-+mul r0.a, r0.a, 1-r1.a ; quintic
-
-; FIXME - these should be able to pair (I think), but don't on nvidia for some reason.
-; (I think) cannot pair due to use of >2 constants in single stage
-lrp r0.rgb, c2, r0, r1 ; blend between color and greyscale
-mad r0.a, r0.a, c6.a, c4.a ; Take Fresnel R(0) into consideration
-
-mul r0.rgb, r0, r0.a ; multiply output color by result of fresnel calc
-
-#if NORMALMAPALPHAENVMAPMASK
-+mul r0.a, c0.a, t0.a ; Fade amount * alpha from the texture
-#else
-+mov r0.a, c0.a ; Just use the fade amount
-#endif
-
-
+; STATIC: "NORMALMAPALPHAENVMAPMASK" "0..1"
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Environment mapping on a bumped surface
+; t0 - Normalmap
+; t3 - Cube environment map (*must* be a cube map!)
+;
+; c0 - color to multiply the results by
+; c1 - envmap contrast
+; c2 - envmap saturation
+; c3 - grey weights
+; c4 - fresnel amount
+; Input texture coords required here are a little wonky.
+; tc0.uv <- U,V into the normal map
+; tc1.uvw, tc2.uvw, tc3.uvw <- 3x3 matrix transform
+; from tangent space->env map space
+; tc1.q, tc2.q, tc3.q <- eye vector in env map space
+;------------------------------------------------------------------------------
+
+; Get the 3-vector from the normal map
+tex t0
+
+; Perform matrix multiply to get a local normal bump. Then
+; reflect the eye vector through the normal and sample from
+; a cubic environment map.
+texm3x3pad t1, t0_bx2
+texm3x3pad t2, t0_bx2
+texm3x3vspec t3, t0_bx2
+
+; FIXME FIXME - Need to do specialized versions of this with and without:
+; - constant color
+; - fresnel amount of exactly 0 or 1 or in between
+; - envmap contrast of 0, 1, or in between
+; - envmap saturation of 0, 1, or in between
+
+; r0 = constant color * result of bump into envmap
+mul r0.rgb, t3, c0
+
+; dot eye-vector with per-pixel normal from t0
+dp3_sat r1, v0_bx2, t0_bx2
+
+; run Fresnel approx. on it: R0 + (1-R0) (1-cos(q))^5 in alpha channel
+mul r1.rgb, r0, r0 ; color squared
++mul r0.a, 1-r1.a, 1-r1.a ; squared
+
+lrp r0.rgb, c1, r1, r0 ; blend between color and color * color
++mul r0.a, r0.a, r0.a ; quartic
+
+dp3 r1.rgb, r0, c3 ; color greyscaled
++mul r0.a, r0.a, 1-r1.a ; quintic
+
+; FIXME - these should be able to pair (I think), but don't on nvidia for some reason.
+; (I think) cannot pair due to use of >2 constants in single stage
+lrp r0.rgb, c2, r0, r1 ; blend between color and greyscale
+mad r0.a, r0.a, c6.a, c4.a ; Take Fresnel R(0) into consideration
+
+mul r0.rgb, r0, r0.a ; multiply output color by result of fresnel calc
+
+#if NORMALMAPALPHAENVMAPMASK
++mul r0.a, c0.a, t0.a ; Fade amount * alpha from the texture
+#else
++mov r0.a, c0.a ; Just use the fade amount
+#endif
+
+
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedEnvmap_ps14.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedEnvmap_ps14.psh
index 2a4efc7d..dbd03fa3 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedEnvmap_ps14.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedEnvmap_ps14.psh
@@ -1,72 +1,72 @@
-; STATIC: "NORMALMAPALPHAENVMAPMASK" "0..1"
-ps.1.4
-;------------------------------------------------------------------------------
-; Phase 1
-;------------------------------------------------------------------------------
-; Get the 3-vector from the normal map
-texld r0, t0
-; Get environment matrix
-texcrd r1.rgb, t1
-texcrd r2.rgb, t2
-texcrd r3.rgb, t3
-; Normalize eye-ray vector through normalizer cube map
-texld r4, t4 ; <---- CUBE MAP here!!!
-;mov r0.rgba, r4
-
-; Transform normal
-dp3 r5.r, r1, r0_bx2
-dp3 r5.g, r2, r0_bx2
-dp3 r5.b, r3, r0_bx2
-; Reflection calculatiom
-dp3_x2 r3.rgb, r5, r4_bx2 ; 2(N.Eye)
-mul r3.rgb, r5, r3 ; 2N(N.Eye)
-dp3 r2.rgb, r5, r5 ; N.N
-mad r2.rgb, -r4_bx2, r2, r3 ; 2N(N.Eye) - Eye(N.N)
-
-#if NORMALMAPALPHAENVMAPMASK
-; Alpha gets lost after phase marker, so store it here
-mov r5, r0.a
-#endif
-
-;------------------------------------------------------------------------------
-; Phase 2
-;------------------------------------------------------------------------------
-; What's left over from the last phase:
-; r0 - normal
-; r1 - free
-; r2 - vector to sample in envmap
-; r3 - free
-; r4 - normal
-; r5 - normal map alpha (rgba)
-
-phase
-
-; Sample environment map
-texld r3, r2
-
-; dot eye-vector with per-pixel normal from r0
-dp3_sat r1, v0_bx2, r0_bx2
-
-; Result goes in output color (multiply by constant color c0)
-mul r0.rgb, r3, c0
-
-; run Fresnel approx. on it: R0 + (1-R0) (1-cos(q))^5 in alpha channel
-mul r1.rgb, r0, r0
-+mul r0.a, 1-r1.a, 1-r1.a ; squared
-
-lrp r0.rgb, c1, r1, r0 ; blend between color and color * color
-+mul r0.a, r0.a, r0.a ; quartic
-
-dp3 r1.rgb, r0, c3
-+mul r0.a, r0.a, 1-r1.a ; quintic
-
-lrp r0.rgb, c2, r0, r1 ; blend between color and greyscale
-mad r0.a, r0.a, c6.a, c4.a ; Take Fresnel R(0) into consideration
-
-mul r0.rgb, r0, r0.a ; multiply output color by result of fresnel calc
-
-#if NORMALMAPALPHAENVMAPMASK
-+mul r0.a, c0.a, r5.r ; Fade amount * alpha from the texture
-#else
-+mov r0.a, c0.a ; Just use the fade amount
-#endif
+; STATIC: "NORMALMAPALPHAENVMAPMASK" "0..1"
+ps.1.4
+;------------------------------------------------------------------------------
+; Phase 1
+;------------------------------------------------------------------------------
+; Get the 3-vector from the normal map
+texld r0, t0
+; Get environment matrix
+texcrd r1.rgb, t1
+texcrd r2.rgb, t2
+texcrd r3.rgb, t3
+; Normalize eye-ray vector through normalizer cube map
+texld r4, t4 ; <---- CUBE MAP here!!!
+;mov r0.rgba, r4
+
+; Transform normal
+dp3 r5.r, r1, r0_bx2
+dp3 r5.g, r2, r0_bx2
+dp3 r5.b, r3, r0_bx2
+; Reflection calculatiom
+dp3_x2 r3.rgb, r5, r4_bx2 ; 2(N.Eye)
+mul r3.rgb, r5, r3 ; 2N(N.Eye)
+dp3 r2.rgb, r5, r5 ; N.N
+mad r2.rgb, -r4_bx2, r2, r3 ; 2N(N.Eye) - Eye(N.N)
+
+#if NORMALMAPALPHAENVMAPMASK
+; Alpha gets lost after phase marker, so store it here
+mov r5, r0.a
+#endif
+
+;------------------------------------------------------------------------------
+; Phase 2
+;------------------------------------------------------------------------------
+; What's left over from the last phase:
+; r0 - normal
+; r1 - free
+; r2 - vector to sample in envmap
+; r3 - free
+; r4 - normal
+; r5 - normal map alpha (rgba)
+
+phase
+
+; Sample environment map
+texld r3, r2
+
+; dot eye-vector with per-pixel normal from r0
+dp3_sat r1, v0_bx2, r0_bx2
+
+; Result goes in output color (multiply by constant color c0)
+mul r0.rgb, r3, c0
+
+; run Fresnel approx. on it: R0 + (1-R0) (1-cos(q))^5 in alpha channel
+mul r1.rgb, r0, r0
++mul r0.a, 1-r1.a, 1-r1.a ; squared
+
+lrp r0.rgb, c1, r1, r0 ; blend between color and color * color
++mul r0.a, r0.a, r0.a ; quartic
+
+dp3 r1.rgb, r0, c3
++mul r0.a, r0.a, 1-r1.a ; quintic
+
+lrp r0.rgb, c2, r0, r1 ; blend between color and greyscale
+mad r0.a, r0.a, c6.a, c4.a ; Take Fresnel R(0) into consideration
+
+mul r0.rgb, r0, r0.a ; multiply output color by result of fresnel calc
+
+#if NORMALMAPALPHAENVMAPMASK
++mul r0.a, c0.a, r5.r ; Fade amount * alpha from the texture
+#else
++mov r0.a, c0.a ; Just use the fade amount
+#endif
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedLightmap.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedLightmap.psh
index 9e55248e..82b83a49 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedLightmap.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedLightmap.psh
@@ -1,79 +1,79 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Computes the diffuse component of lighting using lightmap + bumpmap
-; t0 - Normalmap
-; t1 - Lightmap1
-; t2 - Lightmap2
-; t3 - Lightmap3
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - Normalmap and lightmap texture coordinates
-; c0, c1, c2 - Axes of the lightmap coordinate system in tangent space
-;------------------------------------------------------------------------------
-
-; Get the 3-vector from the normal map
-tex t0
-
-; Sample the lightmaps
-tex t1
-tex t2
-tex t3
-
-; output = lightmapColor[0] * ( ( N dot basis[0] )^2 ) +
-; lightmapColor[1] * ( ( N dot basis[1] )^2 ) +
-; lightmapColor[2] * ( ( N dot basis[2] )^2 ) +
-
-; r0 = ( N dot basis[0] )
-; don't "_sat" here so that everything adds up to one even if the normal is outside of the basis!!!!!
-dp3 r0, t0_bx2, c0
-
-; r1 = ( N dot basis[1] )
-dp3 r1, t0_bx2, c1
-
-;----
-; r0 = ( N dot basis[0] )
-; r1 = ( N dot basis[1] )
-;----
-
-; r0.rgb = ( N dot basis[0] )^2
-mul r0.rgb, r0, r0
-
-; r1.a = ( N dot basis[1] )^2
-+mul r1.a, r1, r1
-
-;----
-; r0.rgb = ( N dot basis[0] )^2
-; r1.a = ( N dot basis[1] )^2
-;----
-
-mul t1, r0, t1
-
-;----
-; r1.a = ( N dot basis[1] )^2
-; t1 = lightmapColor[0] * ( N dot basis[0] )^2
-;----
-
-dp3 r0, t0_bx2, c2
-
-;----
-; r1.a = ( N dot basis[1] )^2
-; t1 = lightmapColor[0] * ( N dot basis[0] )^2
-; r0 = ( N dot basis[2] )
-;----
-
-mad t1.rgb, r1.a, t2, t1
-+mul r0.a, r0, r0
-
-;----
-; t1.rgb = lightmapColor[0] * ( N dot basis[0] )^2 + lightmapColor[1] * ( N dot basis[1] )^2
-; r0.a = ( N dot basis[2] )^2
-;----
-
-mad r0.rgba, r0.a, t3, t1
-
-;----
-; r0.rgb = lightmapColor[0] * ( N dot basis[0] )^2 +
-; lightmapColor[1] * ( N dot basis[1] )^2 +
-; lightmapColor[2] * ( N dot basis[2] )^2
-;----
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Computes the diffuse component of lighting using lightmap + bumpmap
+; t0 - Normalmap
+; t1 - Lightmap1
+; t2 - Lightmap2
+; t3 - Lightmap3
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - Normalmap and lightmap texture coordinates
+; c0, c1, c2 - Axes of the lightmap coordinate system in tangent space
+;------------------------------------------------------------------------------
+
+; Get the 3-vector from the normal map
+tex t0
+
+; Sample the lightmaps
+tex t1
+tex t2
+tex t3
+
+; output = lightmapColor[0] * ( ( N dot basis[0] )^2 ) +
+; lightmapColor[1] * ( ( N dot basis[1] )^2 ) +
+; lightmapColor[2] * ( ( N dot basis[2] )^2 ) +
+
+; r0 = ( N dot basis[0] )
+; don't "_sat" here so that everything adds up to one even if the normal is outside of the basis!!!!!
+dp3 r0, t0_bx2, c0
+
+; r1 = ( N dot basis[1] )
+dp3 r1, t0_bx2, c1
+
+;----
+; r0 = ( N dot basis[0] )
+; r1 = ( N dot basis[1] )
+;----
+
+; r0.rgb = ( N dot basis[0] )^2
+mul r0.rgb, r0, r0
+
+; r1.a = ( N dot basis[1] )^2
++mul r1.a, r1, r1
+
+;----
+; r0.rgb = ( N dot basis[0] )^2
+; r1.a = ( N dot basis[1] )^2
+;----
+
+mul t1, r0, t1
+
+;----
+; r1.a = ( N dot basis[1] )^2
+; t1 = lightmapColor[0] * ( N dot basis[0] )^2
+;----
+
+dp3 r0, t0_bx2, c2
+
+;----
+; r1.a = ( N dot basis[1] )^2
+; t1 = lightmapColor[0] * ( N dot basis[0] )^2
+; r0 = ( N dot basis[2] )
+;----
+
+mad t1.rgb, r1.a, t2, t1
++mul r0.a, r0, r0
+
+;----
+; t1.rgb = lightmapColor[0] * ( N dot basis[0] )^2 + lightmapColor[1] * ( N dot basis[1] )^2
+; r0.a = ( N dot basis[2] )^2
+;----
+
+mad r0.rgba, r0.a, t3, t1
+
+;----
+; r0.rgb = lightmapColor[0] * ( N dot basis[0] )^2 +
+; lightmapColor[1] * ( N dot basis[1] )^2 +
+; lightmapColor[2] * ( N dot basis[2] )^2
+;----
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedLightmap_base_ps14.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedLightmap_base_ps14.psh
index 39a25964..4756b5bd 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedLightmap_base_ps14.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedLightmap_base_ps14.psh
@@ -1,39 +1,39 @@
-;------------------------------------------------------------------------------
-; Computes the diffuse component of lighting using lightmap + bumpmap
-; t0 - Normalmap
-; t1 - Lightmap1
-; t2 - Lightmap2
-; t3 - Lightmap3
-; t4 - Base
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - Normalmap and lightmap texture coordinates
-; c0, c1, c2 - Axes of the lightmap coordinate system in tangent space
-;------------------------------------------------------------------------------
-ps.1.4
-
-; Get the 3-vector from the normal map
-texld r0, t0
-
-; Sample the lightmaps
-texld r1, t1
-texld r2, t2
-texld r3, t3
-
-; Sample the base texture
-texld r4, t4
-
-; output = (lightmapColor[0] * ( ( N dot basis[0] )^2 ) +
-; lightmapColor[1] * ( ( N dot basis[1] )^2 ) +
-; lightmapColor[2] * ( ( N dot basis[2] )^2 ) ) * base
-
-dp3 r5.r, r0_bx2, c0
-dp3 r5.g, r0_bx2, c1
-dp3 r5.b, r0_bx2, c2
-mul r5.rgb, r5, r5
-mul r1, r1, r5.r
-mad r1, r2, r5.g, r1
-mad r1, r3, r5.g, r1
-
-; assume overbright_2 !!!
-mul_x2 r0, r1, r4
+;------------------------------------------------------------------------------
+; Computes the diffuse component of lighting using lightmap + bumpmap
+; t0 - Normalmap
+; t1 - Lightmap1
+; t2 - Lightmap2
+; t3 - Lightmap3
+; t4 - Base
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - Normalmap and lightmap texture coordinates
+; c0, c1, c2 - Axes of the lightmap coordinate system in tangent space
+;------------------------------------------------------------------------------
+ps.1.4
+
+; Get the 3-vector from the normal map
+texld r0, t0
+
+; Sample the lightmaps
+texld r1, t1
+texld r2, t2
+texld r3, t3
+
+; Sample the base texture
+texld r4, t4
+
+; output = (lightmapColor[0] * ( ( N dot basis[0] )^2 ) +
+; lightmapColor[1] * ( ( N dot basis[1] )^2 ) +
+; lightmapColor[2] * ( ( N dot basis[2] )^2 ) ) * base
+
+dp3 r5.r, r0_bx2, c0
+dp3 r5.g, r0_bx2, c1
+dp3 r5.b, r0_bx2, c2
+mul r5.rgb, r5, r5
+mul r1, r1, r5.r
+mad r1, r2, r5.g, r1
+mad r1, r3, r5.g, r1
+
+; assume overbright_2 !!!
+mul_x2 r0, r1, r4
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedLightmap_blend_ps14.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedLightmap_blend_ps14.psh
index f17f14cf..2b43ee33 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedLightmap_blend_ps14.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_BumpmappedLightmap_blend_ps14.psh
@@ -1,47 +1,47 @@
-;------------------------------------------------------------------------------
-; Computes the diffuse component of lighting using lightmap + bumpmap
-; t0 - Normalmap
-; t1 - Lightmap1
-; t2 - Lightmap2
-; t3 - Lightmap3
-; t4 - Base1
-; t5 - Base2
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - Normalmap and lightmap texture coordinates
-; c0, c1, c2 - Axes of the lightmap coordinate system in tangent space
-;------------------------------------------------------------------------------
-ps.1.4
-
-; output = (lightmapColor[0] * ( ( N dot basis[0] )^2 ) +
-; lightmapColor[1] * ( ( N dot basis[1] )^2 ) +
-; lightmapColor[2] * ( ( N dot basis[2] )^2 ) ) * lerp(base1, base2, lightmapColor[0].a)
-
-; Get the 3-vector from the normal map
-texld r0, t0
-
-dp3 r5.r, r0_bx2, c0
-dp3 r5.g, r0_bx2, c1
-dp3 r5.b, r0_bx2, c2
-mul r5.rgb, r5, r5
-
-phase
-
-; Sample the lightmaps
-texld r1, t1
-texld r2, t2
-texld r3, t3
-
-; Sample the base textures
-texld r4, t4
-texld r5, t5
-
-mul r1, r1, r5.r
-mad r1, r2, r5.g, r1
-mad r1, r3, r5.g, r1
-
-; blend base textures
-lrp r4, r4, r5, r1.a
-
-; assume overbright_2 !!!
-mul_x2 r0, r1, r4
+;------------------------------------------------------------------------------
+; Computes the diffuse component of lighting using lightmap + bumpmap
+; t0 - Normalmap
+; t1 - Lightmap1
+; t2 - Lightmap2
+; t3 - Lightmap3
+; t4 - Base1
+; t5 - Base2
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - Normalmap and lightmap texture coordinates
+; c0, c1, c2 - Axes of the lightmap coordinate system in tangent space
+;------------------------------------------------------------------------------
+ps.1.4
+
+; output = (lightmapColor[0] * ( ( N dot basis[0] )^2 ) +
+; lightmapColor[1] * ( ( N dot basis[1] )^2 ) +
+; lightmapColor[2] * ( ( N dot basis[2] )^2 ) ) * lerp(base1, base2, lightmapColor[0].a)
+
+; Get the 3-vector from the normal map
+texld r0, t0
+
+dp3 r5.r, r0_bx2, c0
+dp3 r5.g, r0_bx2, c1
+dp3 r5.b, r0_bx2, c2
+mul r5.rgb, r5, r5
+
+phase
+
+; Sample the lightmaps
+texld r1, t1
+texld r2, t2
+texld r3, t3
+
+; Sample the base textures
+texld r4, t4
+texld r5, t5
+
+mul r1, r1, r5.r
+mad r1, r2, r5.g, r1
+mad r1, r3, r5.g, r1
+
+; blend base textures
+lrp r4, r4, r5, r1.a
+
+; assume overbright_2 !!!
+mul_x2 r0, r1, r4
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_Decal.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_Decal.psh
index 86e627e5..01984202 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_Decal.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_Decal.psh
@@ -1,47 +1,47 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Computes the diffuse component of lighting using lightmap + bumpmap
-; t0 - decal texture
-; t1 - Lightmap1
-; t2 - Lightmap2
-; t3 - Lightmap3
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - Normalmap and lightmap texture coordinates
-; c0, c1, c2 - ( ( N dot basis[0] )^2 ), ( ( N dot basis[1] )^2 ), ( ( N dot basis[2] )^2 )
-;------------------------------------------------------------------------------
-
-; Get the decal color
-tex t0
-
-; Sample the lightmaps
-tex t1
-tex t2
-tex t3
-
-; output = lightmapColor[0] * ( ( N dot basis[0] )^2 ) +
-; lightmapColor[1] * ( ( N dot basis[1] )^2 ) +
-; lightmapColor[2] * ( ( N dot basis[2] )^2 ) +
-
-; r0 = lightmapColor[0] * ( ( N dot basis[0] )^2 )
-mul r0, t1, c0
-
-; r0 = lightmapColor[0] * ( ( N dot basis[0] )^2 ) + lightmapColor[1] * ( ( N dot basis[1] )^2 )
-mad r0, t2, c1, r0
-
-; r0 = lightmapColor[0] * ( ( N dot basis[0] )^2 ) +
-; lightmapColor[1] * ( ( N dot basis[1] )^2 ) +
-; lightmapColor[2] * ( ( N dot basis[2] )^2 )
-mad r0, t3, c2, r0
-
-; Modulate by decal texture
-mul r0.rgb, r0, t0
-+ mov r0.a, t0.a
-
-; Modulate by constant color
-mul r0, r0, c3
-
-; Modulate by per-vertex factor
-mul r0, r0, v0
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Computes the diffuse component of lighting using lightmap + bumpmap
+; t0 - decal texture
+; t1 - Lightmap1
+; t2 - Lightmap2
+; t3 - Lightmap3
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - Normalmap and lightmap texture coordinates
+; c0, c1, c2 - ( ( N dot basis[0] )^2 ), ( ( N dot basis[1] )^2 ), ( ( N dot basis[2] )^2 )
+;------------------------------------------------------------------------------
+
+; Get the decal color
+tex t0
+
+; Sample the lightmaps
+tex t1
+tex t2
+tex t3
+
+; output = lightmapColor[0] * ( ( N dot basis[0] )^2 ) +
+; lightmapColor[1] * ( ( N dot basis[1] )^2 ) +
+; lightmapColor[2] * ( ( N dot basis[2] )^2 ) +
+
+; r0 = lightmapColor[0] * ( ( N dot basis[0] )^2 )
+mul r0, t1, c0
+
+; r0 = lightmapColor[0] * ( ( N dot basis[0] )^2 ) + lightmapColor[1] * ( ( N dot basis[1] )^2 )
+mad r0, t2, c1, r0
+
+; r0 = lightmapColor[0] * ( ( N dot basis[0] )^2 ) +
+; lightmapColor[1] * ( ( N dot basis[1] )^2 ) +
+; lightmapColor[2] * ( ( N dot basis[2] )^2 )
+mad r0, t3, c2, r0
+
+; Modulate by decal texture
+mul r0.rgb, r0, t0
++ mov r0.a, t0.a
+
+; Modulate by constant color
+mul r0, r0, c3
+
+; Modulate by per-vertex factor
+mul r0, r0, v0
+
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_Detail.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_Detail.psh
index 89b6c322..4e3625f1 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_Detail.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_Detail.psh
@@ -1,18 +1,18 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-tex t2
-mul r0, t0, v0 ; base times vertex color (with alpha)
-mul r0.rgb, t1, r0 ; fold in lightmap (color only)
-mul_x2 r1.rgb, r0, t2 ; detail texture
-lrp r0.rgb, c2, r1, r0
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+tex t2
+mul r0, t0, v0 ; base times vertex color (with alpha)
+mul r0.rgb, t1, r0 ; fold in lightmap (color only)
+mul_x2 r1.rgb, r0, t2 ; detail texture
+lrp r0.rgb, c2, r1, r0
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_DetailNoTexture.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_DetailNoTexture.psh
index a9129757..a1d6c4e1 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_DetailNoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_DetailNoTexture.psh
@@ -1,16 +1,16 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t1
-tex t2
-mul r0.rgb, t1, v0 + ; base times vertex color (with alpha)
-mov r0.a, v0.a
-mul_x2 r0.rgb, r0, t2 ; detail texture
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t1
+tex t2
+mul r0.rgb, t1, v0 + ; base times vertex color (with alpha)
+mov r0.a, v0.a
+mul_x2 r0.rgb, r0, t2 ; detail texture
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_DetailSelfIlluminated.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_DetailSelfIlluminated.psh
index a9e05150..575585b7 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_DetailSelfIlluminated.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_DetailSelfIlluminated.psh
@@ -1,23 +1,23 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-tex t2
-mul r0.rgb, t0, v0 + ; base times vertex color (no alpha)
-mov r0.a, v0.a ; Grab alpha from vertex color
-
-mul r0.rgb, t1, r0 ; fold in lighting (color only)
-mul_x2 r1.rgb, r0, t2 ; detail texture
-lrp r0.rgb, c2, r1, r0
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-mul r1, c1, t0 ; Self illum * tint
-lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lightmap
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+tex t2
+mul r0.rgb, t0, v0 + ; base times vertex color (no alpha)
+mov r0.a, v0.a ; Grab alpha from vertex color
+
+mul r0.rgb, t1, r0 ; fold in lighting (color only)
+mul_x2 r1.rgb, r0, t2 ; detail texture
+lrp r0.rgb, c2, r1, r0
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+mul r1, c1, t0 ; Self illum * tint
+lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lightmap
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_EnvMapNoTexture.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_EnvMapNoTexture.psh
index 919da94c..706ba7c2 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_EnvMapNoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_EnvMapNoTexture.psh
@@ -1,21 +1,21 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c1 - self-illum tint
-; c2 - envmap tint
-;------------------------------------------------------------------------------
-
-tex t1
-tex t2
-
-mov r0.rgb, v0 + ; vertex color
-mul r0.a, v0.a, t2.a ; vertex alpha * envmap alpha
-
-mad r0.rgb, t2, c2, r0 ; + envmap * envmaptint (color only)
-mul r0.rgb, t1, r0 ; fold in lightmap (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c1 - self-illum tint
+; c2 - envmap tint
+;------------------------------------------------------------------------------
+
+tex t1
+tex t2
+
+mov r0.rgb, v0 + ; vertex color
+mul r0.a, v0.a, t2.a ; vertex alpha * envmap alpha
+
+mad r0.rgb, t2, c2, r0 ; + envmap * envmaptint (color only)
+mul r0.rgb, t1, r0 ; fold in lightmap (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_EnvMapV2.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_EnvMapV2.psh
index f0205e86..05812ff1 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_EnvMapV2.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_EnvMapV2.psh
@@ -1,20 +1,20 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c1 - self-illum tint
-; c2 - envmap tint
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-tex t2
-
-mul r0, t0, v0 ; base times vertex color (with alpha)
-mul r0.rgb, t1, r0 ; fold in lightmap (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-mad r0.rgb, t2, c2, r0 ; + envmap * envmaptint (color only)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c1 - self-illum tint
+; c2 - envmap tint
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+tex t2
+
+mul r0, t0, v0 ; base times vertex color (with alpha)
+mul r0.rgb, t1, r0 ; fold in lightmap (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+mad r0.rgb, t2, c2, r0 ; + envmap * envmaptint (color only)
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_LightingOnly_Overbright2.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_LightingOnly_Overbright2.psh
index 30bd9f76..c4f2ba23 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_LightingOnly_Overbright2.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_LightingOnly_Overbright2.psh
@@ -1,6 +1,6 @@
-ps.1.1
-
-tex t1
-
-mov r0.rgba, t1
-
+ps.1.1
+
+tex t1
+
+mov r0.rgba, t1
+
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_MaskedEnvMapNoTexture.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_MaskedEnvMapNoTexture.psh
index ee59d663..a1e63741 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_MaskedEnvMapNoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_MaskedEnvMapNoTexture.psh
@@ -1,24 +1,24 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c1 - self-illum tint
-; c2 - envmap tint
-;------------------------------------------------------------------------------
-
-tex t1
-tex t2
-tex t3
-
-mov r0.rgb, v0 ; vertex color
-mul r1, t2, t3 ; envmap * envmapmask
-
-mad r0.rgb, r1, c2, r0 + ; + envmap * envmapmask * envmaptint (color only)
-mul r0.a, v0.a, r1.a ; alpha = vertex alpha * envmap alpha * envmapmask alpha
-
-mul r0.rgb, t1, r0 ; fold in lightmap (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c1 - self-illum tint
+; c2 - envmap tint
+;------------------------------------------------------------------------------
+
+tex t1
+tex t2
+tex t3
+
+mov r0.rgb, v0 ; vertex color
+mul r1, t2, t3 ; envmap * envmapmask
+
+mad r0.rgb, r1, c2, r0 + ; + envmap * envmapmask * envmaptint (color only)
+mul r0.a, v0.a, r1.a ; alpha = vertex alpha * envmap alpha * envmapmask alpha
+
+mul r0.rgb, t1, r0 ; fold in lightmap (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_MaskedEnvMapV2.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_MaskedEnvMapV2.psh
index 398ed46a..83553ac8 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_MaskedEnvMapV2.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_MaskedEnvMapV2.psh
@@ -1,22 +1,22 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c1 - self-illum tint
-; c2 - envmap tint
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-tex t2
-tex t3
-
-mul r0, t0, v0 ; base times vertex color (with alpha)
-mul r0.rgb, t1, r0 ; fold in lighting (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-mul r1, t2, t3 ; envmap * envmapmask
-mad r0.rgb, r1, c2, r0 ; + envmap * envmapmask * envmaptint (color only)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c1 - self-illum tint
+; c2 - envmap tint
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+tex t2
+tex t3
+
+mul r0, t0, v0 ; base times vertex color (with alpha)
+mul r0.rgb, t1, r0 ; fold in lighting (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+mul r1, t2, t3 ; envmap * envmapmask
+mad r0.rgb, r1, c2, r0 ; + envmap * envmapmask * envmaptint (color only)
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_MultiplyByLighting.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_MultiplyByLighting.psh
index 7944e730..9f09397c 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_MultiplyByLighting.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_MultiplyByLighting.psh
@@ -1,20 +1,20 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-def c2, 1.0f, 1.0f, 1.0f, 1.0f
-
-tex t0
-tex t1
-
-; Blend between grey and lightmap color based on total alpha
-
-mul_x2 r1.rgb, c0, t1 ; Apply overbright to lightmap
-+ mul_sat r1.a, t0, v0 ; base times vertex alpha
-lrp r0, r1.a, r1, c2 ; interpolate between white + color
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+def c2, 1.0f, 1.0f, 1.0f, 1.0f
+
+tex t0
+tex t1
+
+; Blend between grey and lightmap color based on total alpha
+
+mul_x2 r1.rgb, c0, t1 ; Apply overbright to lightmap
++ mul_sat r1.a, t0, v0 ; base times vertex alpha
+lrp r0, r1.a, r1, c2 ; interpolate between white + color
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_MultiplyByLightingNoTexture.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_MultiplyByLightingNoTexture.psh
index e0fb27b7..0e52ed86 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_MultiplyByLightingNoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_MultiplyByLightingNoTexture.psh
@@ -1,20 +1,20 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-def c2, 1.0f, 1.0f, 1.0f, 1.0f
-
-tex t0
-tex t1
-
-; Blend between grey and lightmap color based on total alpha
-
-mul_x2 r1.rgb, c0, t1 ; Apply overbright to lightmap
-+ mov_sat r1.a, v0 ; vertex alpha
-lrp r0, r1.a, r1, c2 ; interpolate between white + color
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+def c2, 1.0f, 1.0f, 1.0f, 1.0f
+
+tex t0
+tex t1
+
+; Blend between grey and lightmap color based on total alpha
+
+mul_x2 r1.rgb, c0, t1 ; Apply overbright to lightmap
++ mov_sat r1.a, v0 ; vertex alpha
+lrp r0, r1.a, r1, c2 ; interpolate between white + color
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_MultiplyByLightingSelfIllum.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_MultiplyByLightingSelfIllum.psh
index 1282ecac..6c939a47 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_MultiplyByLightingSelfIllum.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_MultiplyByLightingSelfIllum.psh
@@ -1,23 +1,23 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-def c2, 1.0f, 1.0f, 1.0f, 1.0f
-
-tex t0
-tex t1
-
-; Blend between white and lightmap color based on total alpha
-mul_x2 r1.rgb, c0, t1 ; Apply overbright to lightmap
-+ mov_sat r1.a, v0 ; opacity == vertex opacity (no alpha in texture)
-
-lrp r0.rgb, t0.a, c1, r1 ; Blend between self-illum + lightmap
-+ mov r0.a, c2.a
-
-lrp r0.rgb, r1.a, r0, c2 ; interpolate between white + color
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+def c2, 1.0f, 1.0f, 1.0f, 1.0f
+
+tex t0
+tex t1
+
+; Blend between white and lightmap color based on total alpha
+mul_x2 r1.rgb, c0, t1 ; Apply overbright to lightmap
++ mov_sat r1.a, v0 ; opacity == vertex opacity (no alpha in texture)
+
+lrp r0.rgb, t0.a, c1, r1 ; Blend between self-illum + lightmap
++ mov r0.a, c2.a
+
+lrp r0.rgb, r1.a, r0, c2 ; interpolate between white + color
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_NoTexture.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_NoTexture.psh
index f02de34b..01b20711 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_NoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_NoTexture.psh
@@ -1,14 +1,14 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t1
-mul r0.rgb, t1, v0 + ; base times vertex color (with alpha)
-mov r0.a, v0.a
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t1
+mul r0.rgb, t1, v0 + ; base times vertex color (with alpha)
+mov r0.a, v0.a
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_SSBumpmappedLightmap.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_SSBumpmappedLightmap.psh
index bdcb7783..29be70ca 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_SSBumpmappedLightmap.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_SSBumpmappedLightmap.psh
@@ -1,34 +1,34 @@
-ps.1.1
-def c0, 1,0,0,0
-def c1, 0,1,0,0
-def c2, 0,0,1,0
-
-;------------------------------------------------------------------------------
-; Computes the diffuse component of lighting using lightmap + bumpmap
-; t0 - Normalmap
-; t1 - Lightmap1
-; t2 - Lightmap2
-; t3 - Lightmap3
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - Normalmap and lightmap texture coordinates
-;------------------------------------------------------------------------------
-
-; Get the 3-vector from the normal map
-tex t0
-
-; Sample the lightmaps
-tex t1
-tex t2
-tex t3
-
-; output = lightmapColor[0] * n.r + lightmapColor[1] * n.g + lightmapColor[2] * n.b
-
-
-mov r0, t0
-dp3 r1, t0, c0
-mul r0.rgb, r1, t1
-dp3 r1, t0, c1
-mad r0.rgb, r1, t2, r0
-dp3 r1, t0, c2
-mad r0.rgb, r1, t3, r0
+ps.1.1
+def c0, 1,0,0,0
+def c1, 0,1,0,0
+def c2, 0,0,1,0
+
+;------------------------------------------------------------------------------
+; Computes the diffuse component of lighting using lightmap + bumpmap
+; t0 - Normalmap
+; t1 - Lightmap1
+; t2 - Lightmap2
+; t3 - Lightmap3
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - Normalmap and lightmap texture coordinates
+;------------------------------------------------------------------------------
+
+; Get the 3-vector from the normal map
+tex t0
+
+; Sample the lightmaps
+tex t1
+tex t2
+tex t3
+
+; output = lightmapColor[0] * n.r + lightmapColor[1] * n.g + lightmapColor[2] * n.b
+
+
+mov r0, t0
+dp3 r1, t0, c0
+mul r0.rgb, r1, t1
+dp3 r1, t0, c1
+mad r0.rgb, r1, t2, r0
+dp3 r1, t0, c2
+mad r0.rgb, r1, t3, r0
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_SelfIlluminated.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_SelfIlluminated.psh
index cf800a2e..1ac3326d 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_SelfIlluminated.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_SelfIlluminated.psh
@@ -1,21 +1,21 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-
-mul r0.rgb, t0, v0 + ; base times vertex color (no alpha)
-mov r0.a, v0.a ; Grab alpha from vertex color
-
-mul r0.rgb, t1, r0 ; fold in lighting (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-mul r1, c1, t0 ; Self illum * tint
-lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lightmap
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+
+mul r0.rgb, t0, v0 + ; base times vertex color (no alpha)
+mov r0.a, v0.a ; Grab alpha from vertex color
+
+mul r0.rgb, t1, r0 ; fold in lighting (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+mul r1, c1, t0 ; Self illum * tint
+lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lightmap
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_SelfIlluminatedEnvMapV2.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_SelfIlluminatedEnvMapV2.psh
index 9fd0a1c5..0121e928 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_SelfIlluminatedEnvMapV2.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_SelfIlluminatedEnvMapV2.psh
@@ -1,27 +1,27 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c1 - self-illum tint
-; c2 - envmap tint
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-tex t2
-
-mul r0.rgb, t0, v0 + ; base times vertex color (no alpha)
-mov r0.a, v0.a ; Grab alpha from vertex color
-
-mul r1, t0.a, t0 ; Self illum
-mad r1, c1, r1, t1 ; Self illum * tint + lightmap
-
-mul r0.rgb, r1, r0 ; fold in lighting (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-mad r0.rgb, t2, c2, r0 ; + envmap * envmaptint (color only)
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c1 - self-illum tint
+; c2 - envmap tint
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+tex t2
+
+mul r0.rgb, t0, v0 + ; base times vertex color (no alpha)
+mov r0.a, v0.a ; Grab alpha from vertex color
+
+mul r1, t0.a, t0 ; Self illum
+mad r1, c1, r1, t1 ; Self illum * tint + lightmap
+
+mul r0.rgb, r1, r0 ; fold in lighting (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+mad r0.rgb, t2, c2, r0 ; + envmap * envmaptint (color only)
+
diff --git a/sp/src/materialsystem/stdshaders/LightmappedGeneric_SelfIlluminatedMaskedEnvMapV2.psh b/sp/src/materialsystem/stdshaders/LightmappedGeneric_SelfIlluminatedMaskedEnvMapV2.psh
index 1e62a416..4d32a715 100644
--- a/sp/src/materialsystem/stdshaders/LightmappedGeneric_SelfIlluminatedMaskedEnvMapV2.psh
+++ b/sp/src/materialsystem/stdshaders/LightmappedGeneric_SelfIlluminatedMaskedEnvMapV2.psh
@@ -1,28 +1,28 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c1 - self-illum tint
-; c2 - envmap tint
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-tex t2
-tex t3
-
-mul r0.rgb, t0, v0 + ; base times vertex color (with alpha)
-mov r0.a, v0.a ; Grab alpha from vertex color
-
-mul r1, c1, t0.a ; Self illum alpha * tint
-mad r1, t0, r1, t1 ; Self illum * tint + lightmap
-mul r0.rgb, r1, r0 ; fold in lighting (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-mul r1, t2, t3 ; envmap * envmapmask
-mad r0.rgb, r1, c2, r0 ; + envmap * envmapmask * envmaptint (color only)
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c1 - self-illum tint
+; c2 - envmap tint
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+tex t2
+tex t3
+
+mul r0.rgb, t0, v0 + ; base times vertex color (with alpha)
+mov r0.a, v0.a ; Grab alpha from vertex color
+
+mul r1, c1, t0.a ; Self illum alpha * tint
+mad r1, t0, r1, t1 ; Self illum * tint + lightmap
+mul r0.rgb, r1, r0 ; fold in lighting (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+mul r1, t2, t3 ; envmap * envmapmask
+mad r0.rgb, r1, c2, r0 ; + envmap * envmapmask * envmaptint (color only)
+
diff --git a/sp/src/materialsystem/stdshaders/Refract_ps11.psh b/sp/src/materialsystem/stdshaders/Refract_ps11.psh
index f3fe34d2..a4e59bf6 100644
--- a/sp/src/materialsystem/stdshaders/Refract_ps11.psh
+++ b/sp/src/materialsystem/stdshaders/Refract_ps11.psh
@@ -1,36 +1,36 @@
-; STATIC: "REFRACTTINTTEXTURE" "0..1"
-; STATIC: "NORMALMAPALPHA" "0..1"
-
-ps.1.1
-
-; t0:
-; texture: dudv map
-; texcoords: dudvmap texcoords
-; t1:
-; texture: refraction render target
-; texcoords:
-
-tex t0 ; sample dudv map
-texbem t1, t0 ; refraction
-
-#if REFRACTTINTTEXTURE
-tex t2
-#endif
-
-#if NORMALMAPALPHA
-tex t3
-#endif
-
-; refracttint
-#if REFRACTTINTTEXTURE
-mul_x2 r0, t1, t2
-#else
-mov r0, t1
-#endif
-
-#if NORMALMAPALPHA
-mul r0.rgb, r0, c0 +
-mov r0.a, t3.a
-#else
-mul r0.rgb, r0, c0
-#endif
+; STATIC: "REFRACTTINTTEXTURE" "0..1"
+; STATIC: "NORMALMAPALPHA" "0..1"
+
+ps.1.1
+
+; t0:
+; texture: dudv map
+; texcoords: dudvmap texcoords
+; t1:
+; texture: refraction render target
+; texcoords:
+
+tex t0 ; sample dudv map
+texbem t1, t0 ; refraction
+
+#if REFRACTTINTTEXTURE
+tex t2
+#endif
+
+#if NORMALMAPALPHA
+tex t3
+#endif
+
+; refracttint
+#if REFRACTTINTTEXTURE
+mul_x2 r0, t1, t2
+#else
+mov r0, t1
+#endif
+
+#if NORMALMAPALPHA
+mul r0.rgb, r0, c0 +
+mov r0.a, t3.a
+#else
+mul r0.rgb, r0, c0
+#endif
diff --git a/sp/src/materialsystem/stdshaders/ShadowModel.psh b/sp/src/materialsystem/stdshaders/ShadowModel.psh
index a7514020..31b6d780 100644
--- a/sp/src/materialsystem/stdshaders/ShadowModel.psh
+++ b/sp/src/materialsystem/stdshaders/ShadowModel.psh
@@ -1,22 +1,22 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-def c0,1.0f, 1.0f, 1.0f, 1.0f
-
-tex t0 ; shadow color
-texkill t1 ; Clip
-texkill t2
-texkill t3 ; backface cull
-
-; Darkening equation, compute a color = (shadow color * shadow alpha + 1- shadow alpha)
-;sub r1, t0, v0.a ; r1 = shadow alpha
-lrp r0.rgb, t0.a, v0, c0 + ; r0.rgb = (shadow color * shadow alpha + 1 - shadow alpha)
-mov r0.a, c0.a ; r0.a = 1
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+def c0,1.0f, 1.0f, 1.0f, 1.0f
+
+tex t0 ; shadow color
+texkill t1 ; Clip
+texkill t2
+texkill t3 ; backface cull
+
+; Darkening equation, compute a color = (shadow color * shadow alpha + 1- shadow alpha)
+;sub r1, t0, v0.a ; r1 = shadow alpha
+lrp r0.rgb, t0.a, v0, c0 + ; r0.rgb = (shadow color * shadow alpha + 1 - shadow alpha)
+mov r0.a, c0.a ; r0.a = 1
+
diff --git a/sp/src/materialsystem/stdshaders/UnlitGeneric.psh b/sp/src/materialsystem/stdshaders/UnlitGeneric.psh
index 53fab24d..409ee0d6 100644
--- a/sp/src/materialsystem/stdshaders/UnlitGeneric.psh
+++ b/sp/src/materialsystem/stdshaders/UnlitGeneric.psh
@@ -1,13 +1,13 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0 ; base color
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0 ; base color
+
mul r0, t0, v0 \ No newline at end of file
diff --git a/sp/src/materialsystem/stdshaders/UnlitGeneric_BaseAlphaMaskedEnvMap.psh b/sp/src/materialsystem/stdshaders/UnlitGeneric_BaseAlphaMaskedEnvMap.psh
index 1ed9314e..32ec9c6e 100644
--- a/sp/src/materialsystem/stdshaders/UnlitGeneric_BaseAlphaMaskedEnvMap.psh
+++ b/sp/src/materialsystem/stdshaders/UnlitGeneric_BaseAlphaMaskedEnvMap.psh
@@ -1,19 +1,19 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c2 - envmaptint
-;------------------------------------------------------------------------------
-
-tex t0 ; base color
-tex t1 ; cube map
-tex t2 ; envmap mask
-
-mul r0.rgb, t1, 1-t2.a ; can't use mad cause can't use 3 texture registers
-mul r0.rgb, c2, r0 ; apply the envmaptint
-mad r0.rgb, t0, v0, r0
-+ mul r0.a, t0, v0
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c2 - envmaptint
+;------------------------------------------------------------------------------
+
+tex t0 ; base color
+tex t1 ; cube map
+tex t2 ; envmap mask
+
+mul r0.rgb, t1, 1-t2.a ; can't use mad cause can't use 3 texture registers
+mul r0.rgb, c2, r0 ; apply the envmaptint
+mad r0.rgb, t0, v0, r0
++ mul r0.a, t0, v0
diff --git a/sp/src/materialsystem/stdshaders/UnlitGeneric_Detail.psh b/sp/src/materialsystem/stdshaders/UnlitGeneric_Detail.psh
index 5fcb3f31..421d2d36 100644
--- a/sp/src/materialsystem/stdshaders/UnlitGeneric_Detail.psh
+++ b/sp/src/materialsystem/stdshaders/UnlitGeneric_Detail.psh
@@ -1,15 +1,15 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0 ; base color
-tex t3 ; detail texture
-
-mul r0, t0, v0
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0 ; base color
+tex t3 ; detail texture
+
+mul r0, t0, v0
mul_x2 r0.rgb, r0, t3 \ No newline at end of file
diff --git a/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailBaseAlphaMaskedEnvMap.psh b/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailBaseAlphaMaskedEnvMap.psh
index 69693331..7d234bb3 100644
--- a/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailBaseAlphaMaskedEnvMap.psh
+++ b/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailBaseAlphaMaskedEnvMap.psh
@@ -1,29 +1,29 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c2 - envmaptint
-;------------------------------------------------------------------------------
-
-tex t0 ; base color
-tex t1 ; cube map
-tex t2 ; envmap mask
-tex t3 ; detail texture
-
-; version 1: applies the mod2x *after* environment map
-;mul r0.rgb, t1, 1-t2.a ; can't use mad cause can't use 3 texture registers
-;mul r0.rgb, c2, r0 ; apply the envmaptint
-;mad r0.rgb, t0, v0, r0
-;+ mul r0.a, t0, v0
-;mul_x2 r0.rgb, r0, t3 ; mod2x detail texture
-
-; version 2: applies the mod2x *before* environment map
-mul r0, t0, v0 ; Base times modulation color
-mul_x2 r0.rgb, r0, t3 ; mod2x detail texture
-mul r1, t1, 1-t2.a ; Have to invert the alpha for basealpha (feh!)
-mul r1, c2, r1 ; apply the envmaptint
-add r0.rgb, r0, r1 ; add in the envmap
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c2 - envmaptint
+;------------------------------------------------------------------------------
+
+tex t0 ; base color
+tex t1 ; cube map
+tex t2 ; envmap mask
+tex t3 ; detail texture
+
+; version 1: applies the mod2x *after* environment map
+;mul r0.rgb, t1, 1-t2.a ; can't use mad cause can't use 3 texture registers
+;mul r0.rgb, c2, r0 ; apply the envmaptint
+;mad r0.rgb, t0, v0, r0
+;+ mul r0.a, t0, v0
+;mul_x2 r0.rgb, r0, t3 ; mod2x detail texture
+
+; version 2: applies the mod2x *before* environment map
+mul r0, t0, v0 ; Base times modulation color
+mul_x2 r0.rgb, r0, t3 ; mod2x detail texture
+mul r1, t1, 1-t2.a ; Have to invert the alpha for basealpha (feh!)
+mul r1, c2, r1 ; apply the envmaptint
+add r0.rgb, r0, r1 ; add in the envmap
diff --git a/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMap.psh b/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMap.psh
index dab6efbb..6e8fde98 100644
--- a/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMap.psh
+++ b/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMap.psh
@@ -1,25 +1,25 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c2 - envmaptint
-;------------------------------------------------------------------------------
-
-tex t0 ; base color
-tex t1 ; cube map
-tex t3 ; detail texture
-
-; version 1: applies the mod2x *after* environment map
-;mul r1, c2, t1
-;mad r0.rgb, t0, v0, r1
-;+ mul r0.a, t0, v0
-;mul_x2 r0.rgb, r0, t3 ; mod2x detail texture
-
-; version 2: applies the mod2x *before* environment map
-mul r0, t0, v0 ; Base times modulation color
-mul_x2 r0.rgb, r0, t3 ; mod2x detail texture
-mad r0.rgb, c2, t1, r0 ; add in tinted envmap
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c2 - envmaptint
+;------------------------------------------------------------------------------
+
+tex t0 ; base color
+tex t1 ; cube map
+tex t3 ; detail texture
+
+; version 1: applies the mod2x *after* environment map
+;mul r1, c2, t1
+;mad r0.rgb, t0, v0, r1
+;+ mul r0.a, t0, v0
+;mul_x2 r0.rgb, r0, t3 ; mod2x detail texture
+
+; version 2: applies the mod2x *before* environment map
+mul r0, t0, v0 ; Base times modulation color
+mul_x2 r0.rgb, r0, t3 ; mod2x detail texture
+mad r0.rgb, c2, t1, r0 ; add in tinted envmap
diff --git a/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMapMask.psh b/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMapMask.psh
index 29411c9b..93786add 100644
--- a/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMapMask.psh
+++ b/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMapMask.psh
@@ -1,29 +1,29 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c2 - envmaptint
-;------------------------------------------------------------------------------
-
-tex t0 ; base color
-tex t1 ; cube map
-tex t2 ; envmap mask
-tex t3 ; detail texture
-
-; version 1: applies the mod2x *after* environment map
-;mul r0.rgb, t1, t2 ; can't use mad cause can't use 3 texture registers
-;mul r0.rgb, c2, r0 ; apply the envmaptint
-;mad r0.rgb, t0, v0, r0
-;+ mul r0.a, t0, v0
-;mul_x2 r0.rgb, r0, t3 ; mod2x detail texture
-
-; version 2: applies the mod2x *before* environment map
-mul r0, t0, v0 ; Base times modulation color
-mul_x2 r0.rgb, r0, t3 ; mod2x detail texture
-mul r1, t1, t2 ; Envmap * envmapmask
-mul r1, c2, r1 ; apply the envmaptint
-add r0.rgb, r0, r1 ; add in the envmap
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c2 - envmaptint
+;------------------------------------------------------------------------------
+
+tex t0 ; base color
+tex t1 ; cube map
+tex t2 ; envmap mask
+tex t3 ; detail texture
+
+; version 1: applies the mod2x *after* environment map
+;mul r0.rgb, t1, t2 ; can't use mad cause can't use 3 texture registers
+;mul r0.rgb, c2, r0 ; apply the envmaptint
+;mad r0.rgb, t0, v0, r0
+;+ mul r0.a, t0, v0
+;mul_x2 r0.rgb, r0, t3 ; mod2x detail texture
+
+; version 2: applies the mod2x *before* environment map
+mul r0, t0, v0 ; Base times modulation color
+mul_x2 r0.rgb, r0, t3 ; mod2x detail texture
+mul r1, t1, t2 ; Envmap * envmapmask
+mul r1, c2, r1 ; apply the envmaptint
+add r0.rgb, r0, r1 ; add in the envmap
diff --git a/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMapMaskNoTexture.psh b/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMapMaskNoTexture.psh
index e8c6f3cb..be678909 100644
--- a/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMapMaskNoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMapMaskNoTexture.psh
@@ -1,21 +1,21 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c2 - envmaptint
-;------------------------------------------------------------------------------
-
-tex t1 ; cube map
-tex t2 ; envmap mask
-tex t3 ; detail texture
-
-; version 1: applies the mod2x *after* environment map
-; version 2 doesn't make sense here!
-mul r0, t1, t2
-mul r0.rgb, c2, r0
-mul r0, r0, v0
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c2 - envmaptint
+;------------------------------------------------------------------------------
+
+tex t1 ; cube map
+tex t2 ; envmap mask
+tex t3 ; detail texture
+
+; version 1: applies the mod2x *after* environment map
+; version 2 doesn't make sense here!
+mul r0, t1, t2
+mul r0.rgb, c2, r0
+mul r0, r0, v0
mul_x2 r0.rgb, r0, t3 ; mod2x detail texture \ No newline at end of file
diff --git a/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMapNoTexture.psh b/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMapNoTexture.psh
index 829849b9..d3796bf9 100644
--- a/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMapNoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailEnvMapNoTexture.psh
@@ -1,19 +1,19 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c2 - envmaptint
-;------------------------------------------------------------------------------
-
-tex t1 ; cube map
-tex t3 ; detail texture
-
-; version 1: applies the mod2x *after* environment map
-; version 2 doesn't make sense here!
-mul r0, v0, t1
-mul r0.rgb, r0, c2
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c2 - envmaptint
+;------------------------------------------------------------------------------
+
+tex t1 ; cube map
+tex t3 ; detail texture
+
+; version 1: applies the mod2x *after* environment map
+; version 2 doesn't make sense here!
+mul r0, v0, t1
+mul r0.rgb, r0, c2
mul_x2 r0.rgb, r0, t3 ; mod2x detail texture \ No newline at end of file
diff --git a/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailNoTexture.psh b/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailNoTexture.psh
index c79dc2ce..193de81e 100644
--- a/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailNoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/UnlitGeneric_DetailNoTexture.psh
@@ -1,10 +1,10 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Just use the vertex color
-;------------------------------------------------------------------------------
-
-tex t3
-
-mul_x2 r0.rgb, v0, t3
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Just use the vertex color
+;------------------------------------------------------------------------------
+
+tex t3
+
+mul_x2 r0.rgb, v0, t3
+ mov r0.a, v0.a \ No newline at end of file
diff --git a/sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMap.psh b/sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMap.psh
index 9116997f..6c08ace4 100644
--- a/sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMap.psh
+++ b/sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMap.psh
@@ -1,17 +1,17 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c2 - envmaptint
-;------------------------------------------------------------------------------
-
-tex t0 ; base color
-tex t1 ; cube map
-
-mul r1, c2, t1
-mad r0.rgb, t0, v0, r1
-+ mul r0.a, t0, v0
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c2 - envmaptint
+;------------------------------------------------------------------------------
+
+tex t0 ; base color
+tex t1 ; cube map
+
+mul r1, c2, t1
+mad r0.rgb, t0, v0, r1
++ mul r0.a, t0, v0
diff --git a/sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMapMask.psh b/sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMapMask.psh
index f8de572c..d00dca76 100644
--- a/sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMapMask.psh
+++ b/sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMapMask.psh
@@ -1,19 +1,19 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c2 - envmaptint
-;------------------------------------------------------------------------------
-
-tex t0 ; base color
-tex t1 ; cube map
-tex t2 ; envmap mask
-
-mul r0.rgb, t1, t2 ; can't use mad cause can't use 3 texture registers
-mul r0.rgb, c2, r0 ; apply the envmaptint
-mad r0.rgb, t0, v0, r0
-+ mul r0.a, t0, v0
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c2 - envmaptint
+;------------------------------------------------------------------------------
+
+tex t0 ; base color
+tex t1 ; cube map
+tex t2 ; envmap mask
+
+mul r0.rgb, t1, t2 ; can't use mad cause can't use 3 texture registers
+mul r0.rgb, c2, r0 ; apply the envmaptint
+mad r0.rgb, t0, v0, r0
++ mul r0.a, t0, v0
diff --git a/sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMapMaskNoTexture.psh b/sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMapMaskNoTexture.psh
index a9bd7e46..87daff55 100644
--- a/sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMapMaskNoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMapMaskNoTexture.psh
@@ -1,17 +1,17 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c2 - envmaptint
-;------------------------------------------------------------------------------
-
-tex t1 ; cube map
-tex t2 ; envmap mask
-
-mul r0, t1, t2
-mul r0.rgb, c2, r0
-mul r0, r0, v0
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c2 - envmaptint
+;------------------------------------------------------------------------------
+
+tex t1 ; cube map
+tex t2 ; envmap mask
+
+mul r0, t1, t2
+mul r0.rgb, c2, r0
+mul r0, r0, v0
diff --git a/sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMapNoTexture.psh b/sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMapNoTexture.psh
index 966255fd..4225a9e1 100644
--- a/sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMapNoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/UnlitGeneric_EnvMapNoTexture.psh
@@ -1,15 +1,15 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c2 - envmaptint
-;------------------------------------------------------------------------------
-
-tex t1 ; cube map
-
-mul r0, v0, t1
-mul r0.rgb, r0, c2
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c2 - envmaptint
+;------------------------------------------------------------------------------
+
+tex t1 ; cube map
+
+mul r0, v0, t1
+mul r0.rgb, r0, c2
diff --git a/sp/src/materialsystem/stdshaders/UnlitGeneric_NoTexture.psh b/sp/src/materialsystem/stdshaders/UnlitGeneric_NoTexture.psh
index feb29ba6..7e2274d9 100644
--- a/sp/src/materialsystem/stdshaders/UnlitGeneric_NoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/UnlitGeneric_NoTexture.psh
@@ -1,7 +1,7 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Just use the vertex color
-;------------------------------------------------------------------------------
-
-mov r0, v0
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Just use the vertex color
+;------------------------------------------------------------------------------
+
+mov r0, v0
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric.psh
index 9824a915..5aea47c4 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric.psh
@@ -1,13 +1,13 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-; Get the color from the texture
-tex t0
-
-mul r0, t0, c3
-mul r0.rgb, v0, r0 ; Apply lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+; Get the color from the texture
+tex t0
+
+mul r0, t0, c3
+mul r0.rgb, v0, r0 ; Apply lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_BaseAlphaMaskedEnvMapV2.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_BaseAlphaMaskedEnvMapV2.psh
index 1844c402..95b80efc 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_BaseAlphaMaskedEnvMapV2.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_BaseAlphaMaskedEnvMapV2.psh
@@ -1,17 +1,17 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-tex t0 ; base color
-tex t1 ; cube map
-tex t2 ; envmap mask
-
-mul r0, t0, c3 ; Base times modulation
-mul r1, t1, 1-t2.a ; Envmap * mask (in alpha channel)
-mul r0.rgb, v0, r0 ; apply vertex lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-mad r0.rgb, r1, c2, r0 ; + envmap * mask * tint
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
-
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+tex t0 ; base color
+tex t1 ; cube map
+tex t2 ; envmap mask
+
+mul r0, t0, c3 ; Base times modulation
+mul r1, t1, 1-t2.a ; Envmap * mask (in alpha channel)
+mul r0.rgb, v0, r0 ; apply vertex lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+mad r0.rgb, r1, c2, r0 ; + envmap * mask * tint
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
+
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_BlendTint.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_BlendTint.psh
index f719821b..e74a5272 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_BlendTint.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_BlendTint.psh
@@ -1,17 +1,17 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-; Get the color from the texture
-tex t0
-
-mul r0, c3, t0
-lrp r0.rgb, c1, c3, r0
-lrp r0.rgb, t0.a, r0, t0
-mul r0.rgb, v0, r0 ; Apply lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#else
-+mov r0.a, c3
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+; Get the color from the texture
+tex t0
+
+mul r0, c3, t0
+lrp r0.rgb, c1, c3, r0
+lrp r0.rgb, t0.a, r0, t0
+mul r0.rgb, v0, r0 ; Apply lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#else
++mov r0.a, c3
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail.psh
index f42d54ac..cdb39b77 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail.psh
@@ -1,16 +1,16 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-; Get the color from the texture
-tex t0
-tex t3
-
-mul r0, t0, c3
-mul r0.rgb, v0, r0 ; Apply lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-mul_x2 r1.rgb, r0, t3 ; detail texture
-lrp r0.rgb, c1, r1, r0
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+; Get the color from the texture
+tex t0
+tex t3
+
+mul r0, t0, c3
+mul r0.rgb, v0, r0 ; Apply lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+mul_x2 r1.rgb, r0, t3 ; detail texture
+lrp r0.rgb, c1, r1, r0
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailBaseAlphaMaskedEnvMapV2.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailBaseAlphaMaskedEnvMapV2.psh
index 09bf59ca..3a329f20 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailBaseAlphaMaskedEnvMapV2.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailBaseAlphaMaskedEnvMapV2.psh
@@ -1,18 +1,18 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-tex t0 ; base color
-tex t1 ; cube map
-tex t2 ; envmap mask
-tex t3 ; detail texture
-
-mul r0, t0, c3 ; Base times modulation
-mul r1, t1, 1-t2.a ; Envmap * mask (in alpha channel)
-mul r0.rgb, v0, r0 ; apply vertex lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-mul_x2 r0.rgb, r0, t3 ; detail texture
-mad r0.rgb, r1, c2, r0 ; + envmap * mask * tint
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+tex t0 ; base color
+tex t1 ; cube map
+tex t2 ; envmap mask
+tex t3 ; detail texture
+
+mul r0, t0, c3 ; Base times modulation
+mul r1, t1, 1-t2.a ; Envmap * mask (in alpha channel)
+mul r0.rgb, v0, r0 ; apply vertex lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+mul_x2 r0.rgb, r0, t3 ; detail texture
+mad r0.rgb, r1, c2, r0 ; + envmap * mask * tint
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailEnvMapV2.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailEnvMapV2.psh
index 12b2295c..ce9ade83 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailEnvMapV2.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailEnvMapV2.psh
@@ -1,16 +1,16 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-tex t0 ; base color
-tex t1 ; cube map
-tex t3 ; detail texture
-
-mul r0, t0, c3 ; base times modulation
-mul r0.rgb, v0, r0 ; apply vertex lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-mul_x2 r0.rgb, r0, t3 ; detail texture
-mad r0.rgb, t1, c2, r0 ; + envmap * envmaptint (color only)
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+tex t0 ; base color
+tex t1 ; cube map
+tex t3 ; detail texture
+
+mul r0, t0, c3 ; base times modulation
+mul r0.rgb, v0, r0 ; apply vertex lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+mul_x2 r0.rgb, r0, t3 ; detail texture
+mad r0.rgb, t1, c2, r0 ; + envmap * envmaptint (color only)
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailMaskedEnvMapV2.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailMaskedEnvMapV2.psh
index ec35a8ba..00945231 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailMaskedEnvMapV2.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailMaskedEnvMapV2.psh
@@ -1,18 +1,18 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-tex t0 ; base color
-tex t1 ; cube map
-tex t2 ; envmap mask
-tex t3 ; detail texture
-
-mul r0, t0, c3 ; Base times modulation
-mul r1, t1, t2 ; Envmap * mask
-mul r0.rgb, v0, r0 ; apply vertex lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-mul_x2 r0.rgb, r0, t3 ; detail texture
-mad r0.rgb, r1, c2, r0 ; + envmap * mask * tint
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+tex t0 ; base color
+tex t1 ; cube map
+tex t2 ; envmap mask
+tex t3 ; detail texture
+
+mul r0, t0, c3 ; Base times modulation
+mul r1, t1, t2 ; Envmap * mask
+mul r0.rgb, v0, r0 ; apply vertex lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+mul_x2 r0.rgb, r0, t3 ; detail texture
+mad r0.rgb, r1, c2, r0 ; + envmap * mask * tint
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailNoTexture.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailNoTexture.psh
index d75a2790..f22d557f 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailNoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailNoTexture.psh
@@ -1,12 +1,12 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-tex t3
-
-mul r0, v0, c3
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-mul_x2 r0.rgb, r0, t3 ; detail texture
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+tex t3
+
+mul r0, v0, c3
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+mul_x2 r0.rgb, r0, t3 ; detail texture
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailSelfIlluminated.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailSelfIlluminated.psh
index 4b80e91b..898393ec 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailSelfIlluminated.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailSelfIlluminated.psh
@@ -1,22 +1,22 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-; Get the color from the texture
-tex t0
-tex t3
-
-; interpolate between illuminated + non-selfilluminated
-mul r0.rgb, t0, c3 + ; base times modulation
-mov r0.a, c3.a
-
-mul r0.rgb, v0, r0 ; Apply lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-mul_x2 r0.rgb, r0, t3 ; detail texture
-
-mul r1, t0, c1 ; Self illum * tint
-lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
-
-#if WRITEONETODESTALPHA
-mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+; Get the color from the texture
+tex t0
+tex t3
+
+; interpolate between illuminated + non-selfilluminated
+mul r0.rgb, t0, c3 + ; base times modulation
+mov r0.a, c3.a
+
+mul r0.rgb, v0, r0 ; Apply lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+mul_x2 r0.rgb, r0, t3 ; detail texture
+
+mul r1, t0, c1 ; Self illum * tint
+lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
+
+#if WRITEONETODESTALPHA
+mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailSelfIlluminatedEnvMapV2.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailSelfIlluminatedEnvMapV2.psh
index e625791a..42befc1f 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailSelfIlluminatedEnvMapV2.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailSelfIlluminatedEnvMapV2.psh
@@ -1,24 +1,24 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-; Get the color from the texture
-tex t0
-tex t1
-tex t3
-
-mul r0.rgb, t0, c3 + ; base times modulation
-mov r0.a, c3.a ; use modulation alpha (don't use texture alpha)
-
-mul r0.rgb, v0, r0 ; Apply lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-mul_x2 r0.rgb, r0, t3 ; detail texture
-
-mul r1, t0, c1 ; Self illum * tint
-lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
-
-mad r0.rgb, t1, c2, r0 ; + envmap * envmaptint (color only)
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+; Get the color from the texture
+tex t0
+tex t1
+tex t3
+
+mul r0.rgb, t0, c3 + ; base times modulation
+mov r0.a, c3.a ; use modulation alpha (don't use texture alpha)
+
+mul r0.rgb, v0, r0 ; Apply lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+mul_x2 r0.rgb, r0, t3 ; detail texture
+
+mul r1, t0, c1 ; Self illum * tint
+lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
+
+mad r0.rgb, t1, c2, r0 ; + envmap * envmaptint (color only)
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailSelfIlluminatedMaskedEnvMapV2.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailSelfIlluminatedMaskedEnvMapV2.psh
index 119633a9..666acb6d 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailSelfIlluminatedMaskedEnvMapV2.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_DetailSelfIlluminatedMaskedEnvMapV2.psh
@@ -1,26 +1,26 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-; Get the color from the texture
-tex t0 ; base
-tex t1 ; env map
-tex t2 ; mask
-tex t3 ; detail
-
-mul r0.rgb, t0, c3 + ; base times modulation
-mul r0.a, c3.a, t2.a ; alpha = mod alpha * mask alpha
-
-mul r0.rgb, v0, r0 ; Apply lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-mul_x2 r0.rgb, r0, t3 ; detail texture
-
-mul r1, t0, c1 ; Self illum * tint
-lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
-
-mul r1, t2, t1 ; envmapmask * envmap
-mad r0.rgb, r1, c2, r0 ; + envmapmask * envmap * envmaptint (color only)
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+; Get the color from the texture
+tex t0 ; base
+tex t1 ; env map
+tex t2 ; mask
+tex t3 ; detail
+
+mul r0.rgb, t0, c3 + ; base times modulation
+mul r0.a, c3.a, t2.a ; alpha = mod alpha * mask alpha
+
+mul r0.rgb, v0, r0 ; Apply lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+mul_x2 r0.rgb, r0, t3 ; detail texture
+
+mul r1, t0, c1 ; Self illum * tint
+lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
+
+mul r1, t2, t1 ; envmapmask * envmap
+mad r0.rgb, r1, c2, r0 ; + envmapmask * envmap * envmaptint (color only)
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail_LerpBase.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail_LerpBase.psh
index 7a9ce740..8fcae481 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail_LerpBase.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail_LerpBase.psh
@@ -1,15 +1,15 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-; Get the color from the texture
-tex t0
-tex t3
-
-lrp r0, c1, t3, t0 ; Lerp between textures
-mul r0, r0, c3
-mul r0.rgb, v0, r0 ; Apply lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+; Get the color from the texture
+tex t0
+tex t3
+
+lrp r0, c1, t3, t0 ; Lerp between textures
+mul r0, r0, c3
+mul r0.rgb, v0, r0 ; Apply lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail_additive.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail_additive.psh
index 64501f74..586a5c07 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail_additive.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail_additive.psh
@@ -1,15 +1,15 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-; Get the color from the texture
-tex t0
-tex t3
-
-mul r1, c1, t3
-mad r0, t0, c3, r1
-mul r0.rgb, v0, r0 ; Apply lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+; Get the color from the texture
+tex t0
+tex t3
+
+mul r1, c1, t3
+mad r0, t0, c3, r1
+mul r0.rgb, v0, r0 ; Apply lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail_additive_selfillum.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail_additive_selfillum.psh
index 07f9d387..e40041fb 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail_additive_selfillum.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_Detail_additive_selfillum.psh
@@ -1,15 +1,15 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-; Get the color from the texture
-tex t0
-tex t3
-
-mul r0, c3, t0
-mul r0.rgb, v0, r0 ; Apply lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-mad r0.rgb, c1, t3, r0
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+; Get the color from the texture
+tex t0
+tex t3
+
+mul r0, c3, t0
+mul r0.rgb, v0, r0 ; Apply lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+mad r0.rgb, c1, t3, r0
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvMapNoTexture.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvMapNoTexture.psh
index 4ce3caca..8e864ab4 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvMapNoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvMapNoTexture.psh
@@ -1,14 +1,14 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-tex t1 ; cube map
-
-mul r0.rgb, t1, c2 + ; envmap * envmaptint (color only) +
-mov r0.a, c3.a ; Use alpha from modulation... (?)
-
-mul r0.rgb, v0, r0 ; apply vertex lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+tex t1 ; cube map
+
+mul r0.rgb, t1, c2 + ; envmap * envmaptint (color only) +
+mov r0.a, c3.a ; Use alpha from modulation... (?)
+
+mul r0.rgb, v0, r0 ; apply vertex lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvMapV2.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvMapV2.psh
index 80ef4330..cfc6e67c 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvMapV2.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvMapV2.psh
@@ -1,14 +1,14 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-tex t0 ; base color
-tex t1 ; cube map
-
-mul r0, t0, c3 ; base times modulation
-mul r0.rgb, v0, r0 ; apply vertex lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-mad r0.rgb, t1, c2, r0 ; + envmap * envmaptint (color only)
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+tex t0 ; base color
+tex t1 ; cube map
+
+mul r0, t0, c3 ; base times modulation
+mul r0.rgb, v0, r0 ; apply vertex lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+mad r0.rgb, t1, c2, r0 ; + envmap * envmaptint (color only)
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2.psh
index e6b0c6e4..7cbd38fc 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2.psh
@@ -1,36 +1,36 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Environment mapping on a bumped surface
-; t0 - Normalmap
-; t3 - Cube environment map (*must* be a cube map!)
-;
-; c0 - color to multiply the results by
-; Input texture coords required here are a little wonky.
-; tc0.uv <- U,V into the normal map
-; tc1.uvw, tc2.uvw, tc3.uvw <- 3x3 matrix transform
-; from tangent space->env map space
-; tc1.q, tc2.q, tc3.q <- eye vector in env map space
-;------------------------------------------------------------------------------
-; This version doesn't multiply by lighting.
-
-; Get the 3-vector from the normal map
-tex t0
-
-; Perform matrix multiply to get a local normal bump. Then
-; reflect the eye vector through the normal and sample from
-; a cubic environment map.
-texm3x3pad t1, t0_bx2
-texm3x3pad t2, t0_bx2
-texm3x3vspec t3, t0_bx2
-
-; result goes in output color
-mul r0.rgb, t3, c0 ; constant color
-+mov r0.a, c0.a
-
-mul r1.rgb, r0, r0
-lrp r0.rgb, c1, r1, r0 ; blend between color and color * color
-dp3 r1.rgb, r0, c3
-lrp r0.rgb, c2, r0, r1 ; blend between color and greyscale
-
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Environment mapping on a bumped surface
+; t0 - Normalmap
+; t3 - Cube environment map (*must* be a cube map!)
+;
+; c0 - color to multiply the results by
+; Input texture coords required here are a little wonky.
+; tc0.uv <- U,V into the normal map
+; tc1.uvw, tc2.uvw, tc3.uvw <- 3x3 matrix transform
+; from tangent space->env map space
+; tc1.q, tc2.q, tc3.q <- eye vector in env map space
+;------------------------------------------------------------------------------
+; This version doesn't multiply by lighting.
+
+; Get the 3-vector from the normal map
+tex t0
+
+; Perform matrix multiply to get a local normal bump. Then
+; reflect the eye vector through the normal and sample from
+; a cubic environment map.
+texm3x3pad t1, t0_bx2
+texm3x3pad t2, t0_bx2
+texm3x3vspec t3, t0_bx2
+
+; result goes in output color
+mul r0.rgb, t3, c0 ; constant color
++mov r0.a, c0.a
+
+mul r1.rgb, r0, r0
+lrp r0.rgb, c1, r1, r0 ; blend between color and color * color
+dp3 r1.rgb, r0, c3
+lrp r0.rgb, c2, r0, r1 ; blend between color and greyscale
+
+
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2_MultByAlpha.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2_MultByAlpha.psh
index 9fa7db3e..9b72f0e4 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2_MultByAlpha.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2_MultByAlpha.psh
@@ -1,42 +1,42 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Environment mapping on a bumped surface
-; t0 - Normalmap
-; t3 - Cube environment map (*must* be a cube map!)
-;
-; c0 - color to multiply the results by
-; Input texture coords required here are a little wonky.
-; tc0.uv <- U,V into the normal map
-; tc1.uvw, tc2.uvw, tc3.uvw <- 3x3 matrix transform
-; from tangent space->env map space
-; tc1.q, tc2.q, tc3.q <- eye vector in env map space
-;------------------------------------------------------------------------------
-; This version doesn't multiply by lighting.
-
-; Get the 3-vector from the normal map
-tex t0
-
-; Perform matrix multiply to get a local normal bump. Then
-; reflect the eye vector through the normal and sample from
-; a cubic environment map.
-texm3x3pad t1, t0_bx2
-texm3x3pad t2, t0_bx2
-texm3x3vspec t3, t0_bx2
-
-; result goes in output color
-mul r0.rgb, t3, c0 ; constant color
-+mov r0.a, c0.a
-
-mul r1.rgb, r0, r0
-lrp r0.rgb, c1, r1, r0 ; blend between color and color * color
-dp3 r1.rgb, r0, c3
-lrp r0.rgb, c2, r0, r1 ; blend between color and greyscale
-
-; Multiply the output color by the alpha channel of the normal map.
-mul r0.rgb, t0.a, r0
-
-
-
-
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Environment mapping on a bumped surface
+; t0 - Normalmap
+; t3 - Cube environment map (*must* be a cube map!)
+;
+; c0 - color to multiply the results by
+; Input texture coords required here are a little wonky.
+; tc0.uv <- U,V into the normal map
+; tc1.uvw, tc2.uvw, tc3.uvw <- 3x3 matrix transform
+; from tangent space->env map space
+; tc1.q, tc2.q, tc3.q <- eye vector in env map space
+;------------------------------------------------------------------------------
+; This version doesn't multiply by lighting.
+
+; Get the 3-vector from the normal map
+tex t0
+
+; Perform matrix multiply to get a local normal bump. Then
+; reflect the eye vector through the normal and sample from
+; a cubic environment map.
+texm3x3pad t1, t0_bx2
+texm3x3pad t2, t0_bx2
+texm3x3vspec t3, t0_bx2
+
+; result goes in output color
+mul r0.rgb, t3, c0 ; constant color
++mov r0.a, c0.a
+
+mul r1.rgb, r0, r0
+lrp r0.rgb, c1, r1, r0 ; blend between color and color * color
+dp3 r1.rgb, r0, c3
+lrp r0.rgb, c2, r0, r1 ; blend between color and greyscale
+
+; Multiply the output color by the alpha channel of the normal map.
+mul r0.rgb, t0.a, r0
+
+
+
+
+
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2_MultByAlpha_ps14.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2_MultByAlpha_ps14.psh
index eac900c9..912143f8 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2_MultByAlpha_ps14.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2_MultByAlpha_ps14.psh
@@ -1,42 +1,42 @@
-ps.1.4
-;------------------------------------------------------------------------------
-; Phase 1
-;------------------------------------------------------------------------------
-; Get the 3-vector from the normal map
-texld r0, t0
-; Get environment matrix
-texcrd r1.rgb, t1
-texcrd r2.rgb, t2
-texcrd r3.rgb, t3
-; Normalize eye-ray vector through normalizer cube map
-texld r4, t4 ; <---- CUBE MAP here!!!
-;mov r0.rgba, r4
-
-; Transform normal
-dp3 r5.r, r1, r0_bx2
-dp3 r5.g, r2, r0_bx2
-dp3 r5.b, r3, r0_bx2
-; Reflection calculatiom
-dp3_x2 r3.rgb, r5, r4_bx2 ; 2(N.Eye)
-mul r3.rgb, r5, r3 ; 2N(N.Eye)
-dp3 r2.rgb, r5, r5 ; N.N
-mad r2.rgb, -r4_bx2, r2, r3 ; 2N(N.Eye) - Eye(N.N)
-; Alpha gets lost after phase marker, so store it here
-mov r5, r0.a
-;------------------------------------------------------------------------------
-; Phase 2
-;------------------------------------------------------------------------------
-phase
-; Sample environment map
-texld r3, r2
-; Result goes in output color (multiply by constant color c0)
-mul r0.rgb, r3, c0
-+mov r0.a, c0.a
-
-mul r1.rgb, r0, r0
-lrp r0.rgb, c1, r1, r0 ; blend between color and color * color
-dp3 r1.rgb, r0, c3
-lrp r0.rgb, c2, r0, r1 ; blend between color and greyscale
-
-; mult by alpha
-mul r0.rgb, r0, r5
+ps.1.4
+;------------------------------------------------------------------------------
+; Phase 1
+;------------------------------------------------------------------------------
+; Get the 3-vector from the normal map
+texld r0, t0
+; Get environment matrix
+texcrd r1.rgb, t1
+texcrd r2.rgb, t2
+texcrd r3.rgb, t3
+; Normalize eye-ray vector through normalizer cube map
+texld r4, t4 ; <---- CUBE MAP here!!!
+;mov r0.rgba, r4
+
+; Transform normal
+dp3 r5.r, r1, r0_bx2
+dp3 r5.g, r2, r0_bx2
+dp3 r5.b, r3, r0_bx2
+; Reflection calculatiom
+dp3_x2 r3.rgb, r5, r4_bx2 ; 2(N.Eye)
+mul r3.rgb, r5, r3 ; 2N(N.Eye)
+dp3 r2.rgb, r5, r5 ; N.N
+mad r2.rgb, -r4_bx2, r2, r3 ; 2N(N.Eye) - Eye(N.N)
+; Alpha gets lost after phase marker, so store it here
+mov r5, r0.a
+;------------------------------------------------------------------------------
+; Phase 2
+;------------------------------------------------------------------------------
+phase
+; Sample environment map
+texld r3, r2
+; Result goes in output color (multiply by constant color c0)
+mul r0.rgb, r3, c0
++mov r0.a, c0.a
+
+mul r1.rgb, r0, r0
+lrp r0.rgb, c1, r1, r0 ; blend between color and color * color
+dp3 r1.rgb, r0, c3
+lrp r0.rgb, c2, r0, r1 ; blend between color and greyscale
+
+; mult by alpha
+mul r0.rgb, r0, r5
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2_ps14.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2_ps14.psh
index 7c88013f..7dec5f7d 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2_ps14.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_EnvmappedBumpmapV2_ps14.psh
@@ -1,39 +1,39 @@
-ps.1.4
-;------------------------------------------------------------------------------
-; Phase 1
-;------------------------------------------------------------------------------
-; Get the 3-vector from the normal map
-texld r0, t0
-; Get environment matrix
-texcrd r1.rgb, t1
-texcrd r2.rgb, t2
-texcrd r3.rgb, t3
-; Normalize eye-ray vector through normalizer cube map
-texld r4, t4 ; <---- CUBE MAP here!!!
-
-; Transform normal
-dp3 r5.r, r1, r0_bx2
-dp3 r5.g, r2, r0_bx2
-dp3 r5.b, r3, r0_bx2
-; Reflection calculatiom
-dp3_x2 r3.rgb, r5, r4_bx2 ; 2(N.Eye)
-mul r3.rgb, r5, r3 ; 2N(N.Eye)
-dp3 r2.rgb, r5, r5 ; N.N
-mad r2.rgb, -r4_bx2, r2, r3 ; 2N(N.Eye) - Eye(N.N)
-; Alpha gets lost after phase marker, so store it here
-mov r5, r0.a
-;------------------------------------------------------------------------------
-; Phase 2
-;------------------------------------------------------------------------------
-phase
-; Sample environment map
-texld r3, r2
-; Result goes in output color (multiply by constant color c0)
-mul r0.rgb, r3, c0
-+mov r0.a, c0.a
-
-mul r1.rgb, r0, r0
-lrp r0.rgb, c1, r1, r0 ; blend between color and color * color
-dp3 r1.rgb, r0, c3
-lrp r0.rgb, c2, r0, r1 ; blend between color and greyscale
-
+ps.1.4
+;------------------------------------------------------------------------------
+; Phase 1
+;------------------------------------------------------------------------------
+; Get the 3-vector from the normal map
+texld r0, t0
+; Get environment matrix
+texcrd r1.rgb, t1
+texcrd r2.rgb, t2
+texcrd r3.rgb, t3
+; Normalize eye-ray vector through normalizer cube map
+texld r4, t4 ; <---- CUBE MAP here!!!
+
+; Transform normal
+dp3 r5.r, r1, r0_bx2
+dp3 r5.g, r2, r0_bx2
+dp3 r5.b, r3, r0_bx2
+; Reflection calculatiom
+dp3_x2 r3.rgb, r5, r4_bx2 ; 2(N.Eye)
+mul r3.rgb, r5, r3 ; 2N(N.Eye)
+dp3 r2.rgb, r5, r5 ; N.N
+mad r2.rgb, -r4_bx2, r2, r3 ; 2N(N.Eye) - Eye(N.N)
+; Alpha gets lost after phase marker, so store it here
+mov r5, r0.a
+;------------------------------------------------------------------------------
+; Phase 2
+;------------------------------------------------------------------------------
+phase
+; Sample environment map
+texld r3, r2
+; Result goes in output color (multiply by constant color c0)
+mul r0.rgb, r3, c0
++mov r0.a, c0.a
+
+mul r1.rgb, r0, r0
+lrp r0.rgb, c1, r1, r0 ; blend between color and color * color
+dp3 r1.rgb, r0, c3
+lrp r0.rgb, c2, r0, r1 ; blend between color and greyscale
+
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_MaskedEnvMapNoTexture.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_MaskedEnvMapNoTexture.psh
index 4c65d906..a6209ab3 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_MaskedEnvMapNoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_MaskedEnvMapNoTexture.psh
@@ -1,15 +1,15 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-tex t1 ; cube map
-tex t2 ; envmap mask
-
-mul r1, t1, t2 ; Envmap * mask
-mul r0.rgb, r1, c2 ; envmap * mask * tint
-mul r0.rgb, v0, r0 ; apply vertex lighting
-mul_x2 r0.rgb, c0, r0 + ; * 2 * (overbrightFactor/2)
-mul r0.a, c3.a, t2.a ; alpha = modulation * mask alpha
-
-#if WRITEONETODESTALPHA
-mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+tex t1 ; cube map
+tex t2 ; envmap mask
+
+mul r1, t1, t2 ; Envmap * mask
+mul r0.rgb, r1, c2 ; envmap * mask * tint
+mul r0.rgb, v0, r0 ; apply vertex lighting
+mul_x2 r0.rgb, c0, r0 + ; * 2 * (overbrightFactor/2)
+mul r0.a, c3.a, t2.a ; alpha = modulation * mask alpha
+
+#if WRITEONETODESTALPHA
+mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_MaskedEnvMapV2.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_MaskedEnvMapV2.psh
index ffa3f1e0..53519d93 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_MaskedEnvMapV2.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_MaskedEnvMapV2.psh
@@ -1,16 +1,16 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-tex t0 ; base color
-tex t1 ; cube map
-tex t2 ; envmap mask
-
-mul r0, t0, c3 ; Base times modulation
-mul r1, t1, t2 ; Envmap * mask
-mul r0.rgb, v0, r0 ; apply vertex lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-mad r0.rgb, r1, c2, r0 ; + envmap * mask * tint
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+tex t0 ; base color
+tex t1 ; cube map
+tex t2 ; envmap mask
+
+mul r0, t0, c3 ; Base times modulation
+mul r1, t1, t2 ; Envmap * mask
+mul r0.rgb, v0, r0 ; apply vertex lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+mad r0.rgb, r1, c2, r0 ; + envmap * mask * tint
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_NoTexture.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_NoTexture.psh
index b98b9396..0bc2e455 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_NoTexture.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_NoTexture.psh
@@ -1,9 +1,9 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-mul r0, v0, c3
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+mul r0, v0, c3
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIllumOnly.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIllumOnly.psh
index 86710123..198ad9e4 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIllumOnly.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIllumOnly.psh
@@ -1,5 +1,5 @@
-ps.1.1
-
-tex t0
-
-mul r0.rgba, c0, t0
+ps.1.1
+
+tex t0
+
+mul r0.rgba, c0, t0
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIlluminated.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIlluminated.psh
index c837e9af..3d14e4b3 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIlluminated.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIlluminated.psh
@@ -1,19 +1,19 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-; Get the color from the texture
-tex t0
-
-; interpolate between illuminated + non-selfilluminated
-mul r0.rgb, t0, c3 + ; base times modulation
-mov r0.a, c3.a
-
-mul r0.rgb, v0, r0 ; Apply lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-mul r1, t0, c1 ; Self illum * tint
-lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+; Get the color from the texture
+tex t0
+
+; interpolate between illuminated + non-selfilluminated
+mul r0.rgb, t0, c3 + ; base times modulation
+mov r0.a, c3.a
+
+mul r0.rgb, v0, r0 ; Apply lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+mul r1, t0, c1 ; Self illum * tint
+lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIlluminatedEnvMapV2.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIlluminatedEnvMapV2.psh
index 2d280f5c..b8ba4d13 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIlluminatedEnvMapV2.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIlluminatedEnvMapV2.psh
@@ -1,21 +1,21 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-; Get the color from the texture
-tex t0
-tex t1
-
-mul r0.rgb, t0, c3 + ; base times modulation
-mov r0.a, c3.a ; use modulation alpha (don't use texture alpha)
-
-mul r0.rgb, v0, r0 ; Apply lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-mul r1, t0, c1 ; Self illum * tint
-lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
-
-mad r0.rgb, t1, c2, r0 ; + envmap * envmaptint (color only)
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+; Get the color from the texture
+tex t0
+tex t1
+
+mul r0.rgb, t0, c3 + ; base times modulation
+mov r0.a, c3.a ; use modulation alpha (don't use texture alpha)
+
+mul r0.rgb, v0, r0 ; Apply lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+mul r1, t0, c1 ; Self illum * tint
+lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
+
+mad r0.rgb, t1, c2, r0 ; + envmap * envmaptint (color only)
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIlluminatedMaskedEnvMapV2.psh b/sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIlluminatedMaskedEnvMapV2.psh
index da6b77c3..44fe15d6 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIlluminatedMaskedEnvMapV2.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitGeneric_SelfIlluminatedMaskedEnvMapV2.psh
@@ -1,23 +1,23 @@
-; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
-ps.1.1
-
-; Get the color from the texture
-tex t0 ; base
-tex t1 ; env map
-tex t2 ; mask
-
-mul r0.rgb, t0, c3 + ; base times modulation
-mul r0.a, c3.a, t2.a ; alpha = mod alpha * mask alpha
-
-mul r0.rgb, v0, r0 ; Apply lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-mul r1, t0, c1 ; Self illum * tint
-lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
-
-mul r1, t2, t1 ; envmapmask * envmap
-mad r0.rgb, r1, c2, r0 ; + envmapmask * envmap * envmaptint (color only)
-
-#if WRITEONETODESTALPHA
-+mov r0.a, c4 ; make alpha 255
-#endif
+; DYNAMIC: "WRITEONETODESTALPHA" "0..1"
+ps.1.1
+
+; Get the color from the texture
+tex t0 ; base
+tex t1 ; env map
+tex t2 ; mask
+
+mul r0.rgb, t0, c3 + ; base times modulation
+mul r0.a, c3.a, t2.a ; alpha = mod alpha * mask alpha
+
+mul r0.rgb, v0, r0 ; Apply lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+mul r1, t0, c1 ; Self illum * tint
+lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
+
+mul r1, t2, t1 ; envmapmask * envmap
+mad r0.rgb, r1, c2, r0 ; + envmapmask * envmap * envmaptint (color only)
+
+#if WRITEONETODESTALPHA
++mov r0.a, c4 ; make alpha 255
+#endif
diff --git a/sp/src/materialsystem/stdshaders/VertexLitTexture.psh b/sp/src/materialsystem/stdshaders/VertexLitTexture.psh
index 7a692c92..628cfc66 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitTexture.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitTexture.psh
@@ -1,15 +1,15 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-; Get the color from the texture
-tex t0
-
-mul r0, t0, v0
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+; Get the color from the texture
+tex t0
+
+mul r0, t0, v0
+
diff --git a/sp/src/materialsystem/stdshaders/VertexLitTexture_Overbright2.psh b/sp/src/materialsystem/stdshaders/VertexLitTexture_Overbright2.psh
index a69250bf..db2c4e2f 100644
--- a/sp/src/materialsystem/stdshaders/VertexLitTexture_Overbright2.psh
+++ b/sp/src/materialsystem/stdshaders/VertexLitTexture_Overbright2.psh
@@ -1,16 +1,16 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-; Get the color from the texture
-tex t0
-
-mul_x2 r0.rgb, t0, v0
-+ mul r0.a, t0, v0
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+; Get the color from the texture
+tex t0
+
+mul_x2 r0.rgb, t0, v0
++ mul r0.a, t0, v0
+
diff --git a/sp/src/materialsystem/stdshaders/WaterCheapFresnelOpaque_ps14.psh b/sp/src/materialsystem/stdshaders/WaterCheapFresnelOpaque_ps14.psh
index 08438dcb..2aff6a46 100644
--- a/sp/src/materialsystem/stdshaders/WaterCheapFresnelOpaque_ps14.psh
+++ b/sp/src/materialsystem/stdshaders/WaterCheapFresnelOpaque_ps14.psh
@@ -1,40 +1,40 @@
-ps.1.4
-
-; Get the 3-vector from the normal map
-texld r0, t0
-; Get environment matrix
-texcrd r1.rgb, t1
-texcrd r2.rgb, t2
-texcrd r3.rgb, t3
-; Normalize eye-ray vector through normalizer cube map
-texld r4, t4 ; <---- CUBE MAP here!!!
-
-; Transform normal
-dp3 r5.r, r1, r0_bx2
-dp3 r5.g, r2, r0_bx2
-dp3 r5.b, r3, r0_bx2
-; Reflection calculatiom
-dp3_x2 r3.rgb, r5, r4_bx2 ; 2(N.Eye)
-mul r3.rgb, r5, r3 ; 2N(N.Eye)
-dp3 r2.rgb, r5, r5 ; N.N
-mad r2.rgb, -r4_bx2, r2, r3 ; 2N(N.Eye) - Eye(N.N)
-
-phase
-
-; Sample environment map
-texld r3, r2
-texld r4, t5 ; Normalize the tangent-space eye vector
-
-; dot eye-vector with per-pixel normal from r0
-dp3_sat r1, r4_bx2, r0_bx2
-
-; run Fresnel approx. on it: R0 + (1-R0) (1-cos(q))^5 in alpha channel
-mul r0.a, 1-r1.a, 1-r1.a ; squared
-mul r0.a, r0.a, r0.a ; quartic
-mul_sat r1.a, r0.a, 1-r1.a ; quintic
-
-; multiply color by reflecttint
-mul r0, r3, c1
-
-; blend between reflected color and fog color based on fresnel
+ps.1.4
+
+; Get the 3-vector from the normal map
+texld r0, t0
+; Get environment matrix
+texcrd r1.rgb, t1
+texcrd r2.rgb, t2
+texcrd r3.rgb, t3
+; Normalize eye-ray vector through normalizer cube map
+texld r4, t4 ; <---- CUBE MAP here!!!
+
+; Transform normal
+dp3 r5.r, r1, r0_bx2
+dp3 r5.g, r2, r0_bx2
+dp3 r5.b, r3, r0_bx2
+; Reflection calculatiom
+dp3_x2 r3.rgb, r5, r4_bx2 ; 2(N.Eye)
+mul r3.rgb, r5, r3 ; 2N(N.Eye)
+dp3 r2.rgb, r5, r5 ; N.N
+mad r2.rgb, -r4_bx2, r2, r3 ; 2N(N.Eye) - Eye(N.N)
+
+phase
+
+; Sample environment map
+texld r3, r2
+texld r4, t5 ; Normalize the tangent-space eye vector
+
+; dot eye-vector with per-pixel normal from r0
+dp3_sat r1, r4_bx2, r0_bx2
+
+; run Fresnel approx. on it: R0 + (1-R0) (1-cos(q))^5 in alpha channel
+mul r0.a, 1-r1.a, 1-r1.a ; squared
+mul r0.a, r0.a, r0.a ; quartic
+mul_sat r1.a, r0.a, 1-r1.a ; quintic
+
+; multiply color by reflecttint
+mul r0, r3, c1
+
+; blend between reflected color and fog color based on fresnel
lrp r0.rgb, r1.a, r0, c0 \ No newline at end of file
diff --git a/sp/src/materialsystem/stdshaders/WaterCheapFresnel_ps14.psh b/sp/src/materialsystem/stdshaders/WaterCheapFresnel_ps14.psh
index 5ebb39f4..741881be 100644
--- a/sp/src/materialsystem/stdshaders/WaterCheapFresnel_ps14.psh
+++ b/sp/src/materialsystem/stdshaders/WaterCheapFresnel_ps14.psh
@@ -1,39 +1,39 @@
-ps.1.4
-
-; Get the 3-vector from the normal map
-texld r0, t0
-; Get environment matrix
-texcrd r1.rgb, t1
-texcrd r2.rgb, t2
-texcrd r3.rgb, t3
-; Normalize eye-ray vector through normalizer cube map
-texld r4, t4 ; <---- CUBE MAP here!!!
-
-; Transform normal
-dp3 r5.r, r1, r0_bx2
-dp3 r5.g, r2, r0_bx2
-dp3 r5.b, r3, r0_bx2
-; Reflection calculatiom
-dp3_x2 r3.rgb, r5, r4_bx2 ; 2(N.Eye)
-mul r3.rgb, r5, r3 ; 2N(N.Eye)
-dp3 r2.rgb, r5, r5 ; N.N
-mad r2.rgb, -r4_bx2, r2, r3 ; 2N(N.Eye) - Eye(N.N)
-
-phase
-
-; Sample environment map
-texld r3, r2
-texld r4, t5 ; Normalize the tangent-space eye vector
-
-; dot eye-vector with per-pixel normal from r0
-dp3_sat r1, r4_bx2, r0_bx2
-
-; run Fresnel approx. on it: R0 + (1-R0) (1-cos(q))^5 in alpha channel
-mul r0.a, 1-r1.a, 1-r1.a ; squared
-mul r0.a, r0.a, r0.a ; quartic
-mul_sat r1.a, r0.a, 1-r1.a ; quintic
-
-; multiply color by reflecttint
-mul r0.rgb, r3, c1
-+mov_sat r0.a, v0.a
-add_sat r0.a, r1.a, r0.a
+ps.1.4
+
+; Get the 3-vector from the normal map
+texld r0, t0
+; Get environment matrix
+texcrd r1.rgb, t1
+texcrd r2.rgb, t2
+texcrd r3.rgb, t3
+; Normalize eye-ray vector through normalizer cube map
+texld r4, t4 ; <---- CUBE MAP here!!!
+
+; Transform normal
+dp3 r5.r, r1, r0_bx2
+dp3 r5.g, r2, r0_bx2
+dp3 r5.b, r3, r0_bx2
+; Reflection calculatiom
+dp3_x2 r3.rgb, r5, r4_bx2 ; 2(N.Eye)
+mul r3.rgb, r5, r3 ; 2N(N.Eye)
+dp3 r2.rgb, r5, r5 ; N.N
+mad r2.rgb, -r4_bx2, r2, r3 ; 2N(N.Eye) - Eye(N.N)
+
+phase
+
+; Sample environment map
+texld r3, r2
+texld r4, t5 ; Normalize the tangent-space eye vector
+
+; dot eye-vector with per-pixel normal from r0
+dp3_sat r1, r4_bx2, r0_bx2
+
+; run Fresnel approx. on it: R0 + (1-R0) (1-cos(q))^5 in alpha channel
+mul r0.a, 1-r1.a, 1-r1.a ; squared
+mul r0.a, r0.a, r0.a ; quartic
+mul_sat r1.a, r0.a, 1-r1.a ; quintic
+
+; multiply color by reflecttint
+mul r0.rgb, r3, c1
++mov_sat r0.a, v0.a
+add_sat r0.a, r1.a, r0.a
diff --git a/sp/src/materialsystem/stdshaders/WaterCheapNoFresnelOpaque_ps11.psh b/sp/src/materialsystem/stdshaders/WaterCheapNoFresnelOpaque_ps11.psh
index 60502016..c1a28c10 100644
--- a/sp/src/materialsystem/stdshaders/WaterCheapNoFresnelOpaque_ps11.psh
+++ b/sp/src/materialsystem/stdshaders/WaterCheapNoFresnelOpaque_ps11.psh
@@ -1,19 +1,19 @@
-ps.1.1
-
-; Get the 3-vector from the normal map
-tex t0
-
-; Perform matrix multiply to get a local normal bump. Then
-; reflect the eye vector through the normal and sample from
-; a cubic environment map.
-texm3x3pad t1, t0_bx2
-texm3x3pad t2, t0_bx2
-texm3x3vspec t3, t0_bx2
-
-mul r0, t3, c1 ; multiply color by reflecttint
-lrp r0.rgb, c1.a, r0, c0 ; blend between reflected color and fog color based on constant factor
-
-
-
-
-
+ps.1.1
+
+; Get the 3-vector from the normal map
+tex t0
+
+; Perform matrix multiply to get a local normal bump. Then
+; reflect the eye vector through the normal and sample from
+; a cubic environment map.
+texm3x3pad t1, t0_bx2
+texm3x3pad t2, t0_bx2
+texm3x3vspec t3, t0_bx2
+
+mul r0, t3, c1 ; multiply color by reflecttint
+lrp r0.rgb, c1.a, r0, c0 ; blend between reflected color and fog color based on constant factor
+
+
+
+
+
diff --git a/sp/src/materialsystem/stdshaders/WaterCheapNoFresnel_ps11.psh b/sp/src/materialsystem/stdshaders/WaterCheapNoFresnel_ps11.psh
index fe76d772..d63151bb 100644
--- a/sp/src/materialsystem/stdshaders/WaterCheapNoFresnel_ps11.psh
+++ b/sp/src/materialsystem/stdshaders/WaterCheapNoFresnel_ps11.psh
@@ -1,18 +1,18 @@
-ps.1.1
-
-; Get the 3-vector from the normal map
-tex t0
-
-; Perform matrix multiply to get a local normal bump. Then
-; reflect the eye vector through the normal and sample from
-; a cubic environment map.
-texm3x3pad t1, t0_bx2
-texm3x3pad t2, t0_bx2
-texm3x3vspec t3, t0_bx2
-
-mul r0.rgb, t3, c1 ; multiply color by reflecttint
-+mov_sat r0.a, v0.a ; NOTE: This is necessary since v0.a can be outside 0 - 1!
-add_sat r0.a, c1.a, r0.a ; cheap water blend factor + constant blend factor
-
-
-
+ps.1.1
+
+; Get the 3-vector from the normal map
+tex t0
+
+; Perform matrix multiply to get a local normal bump. Then
+; reflect the eye vector through the normal and sample from
+; a cubic environment map.
+texm3x3pad t1, t0_bx2
+texm3x3pad t2, t0_bx2
+texm3x3vspec t3, t0_bx2
+
+mul r0.rgb, t3, c1 ; multiply color by reflecttint
++mov_sat r0.a, v0.a ; NOTE: This is necessary since v0.a can be outside 0 - 1!
+add_sat r0.a, c1.a, r0.a ; cheap water blend factor + constant blend factor
+
+
+
diff --git a/sp/src/materialsystem/stdshaders/WaterCheapOpaque_ps11.psh b/sp/src/materialsystem/stdshaders/WaterCheapOpaque_ps11.psh
index 50d7f803..9704bfde 100644
--- a/sp/src/materialsystem/stdshaders/WaterCheapOpaque_ps11.psh
+++ b/sp/src/materialsystem/stdshaders/WaterCheapOpaque_ps11.psh
@@ -1,26 +1,26 @@
-ps.1.1
-
-; Get the 3-vector from the normal map
-tex t0
-
-; Perform matrix multiply to get a local normal bump. Then
-; reflect the eye vector through the normal and sample from
-; a cubic environment map.
-texm3x3pad t1, t0_bx2
-texm3x3pad t2, t0_bx2
-texm3x3vspec t3, t0_bx2
-
-mul r0, t3, c1 ; envmap color * envmaptint
-
-dp3_sat t2, v0_bx2, t0_bx2 ; dot eye-vector with per-pixel normal from t0
-
-; run Fresnel approx. on it: R0 + (1-R0) (1-cos(q))^5 in alpha channel
-; NOTE: This is not perspective-correct and results in strange artifacts
-mul r1.a, 1-t2.a, 1-t2.a ; squared
-mul r1.a, r1.a, r1.a ; quartic
-mul_sat r1.a, r1.a, 1-t2.a ; quintic
-
-; t1.a is now the fresnel factor
-lrp r0.rgb, r1.a, r0, c0 ; blend between reflected color and fog color based on fresnel
-
-
+ps.1.1
+
+; Get the 3-vector from the normal map
+tex t0
+
+; Perform matrix multiply to get a local normal bump. Then
+; reflect the eye vector through the normal and sample from
+; a cubic environment map.
+texm3x3pad t1, t0_bx2
+texm3x3pad t2, t0_bx2
+texm3x3vspec t3, t0_bx2
+
+mul r0, t3, c1 ; envmap color * envmaptint
+
+dp3_sat t2, v0_bx2, t0_bx2 ; dot eye-vector with per-pixel normal from t0
+
+; run Fresnel approx. on it: R0 + (1-R0) (1-cos(q))^5 in alpha channel
+; NOTE: This is not perspective-correct and results in strange artifacts
+mul r1.a, 1-t2.a, 1-t2.a ; squared
+mul r1.a, r1.a, r1.a ; quartic
+mul_sat r1.a, r1.a, 1-t2.a ; quintic
+
+; t1.a is now the fresnel factor
+lrp r0.rgb, r1.a, r0, c0 ; blend between reflected color and fog color based on fresnel
+
+
diff --git a/sp/src/materialsystem/stdshaders/WaterCheapOpaque_ps14.psh b/sp/src/materialsystem/stdshaders/WaterCheapOpaque_ps14.psh
index bd491d58..a1b52625 100644
--- a/sp/src/materialsystem/stdshaders/WaterCheapOpaque_ps14.psh
+++ b/sp/src/materialsystem/stdshaders/WaterCheapOpaque_ps14.psh
@@ -1,31 +1,31 @@
-ps.1.4
-
-; Get the 3-vector from the normal map
-texld r0, t0
-; Get environment matrix
-texcrd r1.rgb, t1
-texcrd r2.rgb, t2
-texcrd r3.rgb, t3
-; Normalize eye-ray vector through normalizer cube map
-texld r4, t4 ; <---- CUBE MAP here!!!
-
-; Transform normal
-dp3 r5.r, r1, r0_bx2
-dp3 r5.g, r2, r0_bx2
-dp3 r5.b, r3, r0_bx2
-; Reflection calculatiom
-dp3_x2 r3.rgb, r5, r4_bx2 ; 2(N.Eye)
-mul r3.rgb, r5, r3 ; 2N(N.Eye)
-dp3 r2.rgb, r5, r5 ; N.N
-mad r2.rgb, -r4_bx2, r2, r3 ; 2N(N.Eye) - Eye(N.N)
-
-phase
-
-; Sample environment map
-texld r3, r2
-
-; multiply color by reflecttint
-mul r0, r3, c1
-
-; blend between reflected color and fog color based on constant factor
-lrp r0.rgb, c1.a, r0, c0
+ps.1.4
+
+; Get the 3-vector from the normal map
+texld r0, t0
+; Get environment matrix
+texcrd r1.rgb, t1
+texcrd r2.rgb, t2
+texcrd r3.rgb, t3
+; Normalize eye-ray vector through normalizer cube map
+texld r4, t4 ; <---- CUBE MAP here!!!
+
+; Transform normal
+dp3 r5.r, r1, r0_bx2
+dp3 r5.g, r2, r0_bx2
+dp3 r5.b, r3, r0_bx2
+; Reflection calculatiom
+dp3_x2 r3.rgb, r5, r4_bx2 ; 2(N.Eye)
+mul r3.rgb, r5, r3 ; 2N(N.Eye)
+dp3 r2.rgb, r5, r5 ; N.N
+mad r2.rgb, -r4_bx2, r2, r3 ; 2N(N.Eye) - Eye(N.N)
+
+phase
+
+; Sample environment map
+texld r3, r2
+
+; multiply color by reflecttint
+mul r0, r3, c1
+
+; blend between reflected color and fog color based on constant factor
+lrp r0.rgb, c1.a, r0, c0
diff --git a/sp/src/materialsystem/stdshaders/WaterCheap_ps11.psh b/sp/src/materialsystem/stdshaders/WaterCheap_ps11.psh
index 34178d28..f12a1bc4 100644
--- a/sp/src/materialsystem/stdshaders/WaterCheap_ps11.psh
+++ b/sp/src/materialsystem/stdshaders/WaterCheap_ps11.psh
@@ -1,26 +1,26 @@
-ps.1.1
-
-; Get the 3-vector from the normal map
-tex t0
-
-; Perform matrix multiply to get a local normal bump. Then
-; reflect the eye vector through the normal and sample from
-; a cubic environment map.
-texm3x3pad t1, t0_bx2
-texm3x3pad t2, t0_bx2
-texm3x3vspec t3, t0_bx2
-
-mul r0.rgb, t3, c1 ; envmap color * envmaptint
-+mov_sat r0.a, v0.a ; Put the cheap water blend factor here
-
-dp3_sat t2, v0_bx2, t0_bx2 ; dot eye-vector with per-pixel normal from t0
-
-; run Fresnel approx. on it: R0 + (1-R0) (1-cos(q))^5 in alpha channel
-; NOTE: This is not perspective-correct and results in strange artifacts
-mul r1.a, 1-t2.a, 1-t2.a ; squared
-mul r1.a, r1.a, r1.a ; quartic
-mul_sat r1.a, r1.a, 1-t2.a ; quintic
-
-; t1.a is now the fresnel factor
-add_sat r0.a, r1.a, r0.a ; Now we have the final blend factor between cheap water + refraction
-
+ps.1.1
+
+; Get the 3-vector from the normal map
+tex t0
+
+; Perform matrix multiply to get a local normal bump. Then
+; reflect the eye vector through the normal and sample from
+; a cubic environment map.
+texm3x3pad t1, t0_bx2
+texm3x3pad t2, t0_bx2
+texm3x3vspec t3, t0_bx2
+
+mul r0.rgb, t3, c1 ; envmap color * envmaptint
++mov_sat r0.a, v0.a ; Put the cheap water blend factor here
+
+dp3_sat t2, v0_bx2, t0_bx2 ; dot eye-vector with per-pixel normal from t0
+
+; run Fresnel approx. on it: R0 + (1-R0) (1-cos(q))^5 in alpha channel
+; NOTE: This is not perspective-correct and results in strange artifacts
+mul r1.a, 1-t2.a, 1-t2.a ; squared
+mul r1.a, r1.a, r1.a ; quartic
+mul_sat r1.a, r1.a, 1-t2.a ; quintic
+
+; t1.a is now the fresnel factor
+add_sat r0.a, r1.a, r0.a ; Now we have the final blend factor between cheap water + refraction
+
diff --git a/sp/src/materialsystem/stdshaders/WaterCheap_ps14.psh b/sp/src/materialsystem/stdshaders/WaterCheap_ps14.psh
index 2c452539..e38f65ee 100644
--- a/sp/src/materialsystem/stdshaders/WaterCheap_ps14.psh
+++ b/sp/src/materialsystem/stdshaders/WaterCheap_ps14.psh
@@ -1,30 +1,30 @@
-ps.1.4
-
-; Get the 3-vector from the normal map
-texld r0, t0
-; Get environment matrix
-texcrd r1.rgb, t1
-texcrd r2.rgb, t2
-texcrd r3.rgb, t3
-; Normalize eye-ray vector through normalizer cube map
-texld r4, t4 ; <---- CUBE MAP here!!!
-
-; Transform normal
-dp3 r5.r, r1, r0_bx2
-dp3 r5.g, r2, r0_bx2
-dp3 r5.b, r3, r0_bx2
-; Reflection calculatiom
-dp3_x2 r3.rgb, r5, r4_bx2 ; 2(N.Eye)
-mul r3.rgb, r5, r3 ; 2N(N.Eye)
-dp3 r2.rgb, r5, r5 ; N.N
-mad r2.rgb, -r4_bx2, r2, r3 ; 2N(N.Eye) - Eye(N.N)
-
-phase
-
-; Sample environment map
-texld r3, r2
-
-; multiply color by reflecttint
-mul r0.rgb, r3, c1
-+mov_sat r0.a, v0.a ; Necessary since v0.a may be negative
-add_sat r0.a, c1.a, r0.a
+ps.1.4
+
+; Get the 3-vector from the normal map
+texld r0, t0
+; Get environment matrix
+texcrd r1.rgb, t1
+texcrd r2.rgb, t2
+texcrd r3.rgb, t3
+; Normalize eye-ray vector through normalizer cube map
+texld r4, t4 ; <---- CUBE MAP here!!!
+
+; Transform normal
+dp3 r5.r, r1, r0_bx2
+dp3 r5.g, r2, r0_bx2
+dp3 r5.b, r3, r0_bx2
+; Reflection calculatiom
+dp3_x2 r3.rgb, r5, r4_bx2 ; 2(N.Eye)
+mul r3.rgb, r5, r3 ; 2N(N.Eye)
+dp3 r2.rgb, r5, r5 ; N.N
+mad r2.rgb, -r4_bx2, r2, r3 ; 2N(N.Eye) - Eye(N.N)
+
+phase
+
+; Sample environment map
+texld r3, r2
+
+; multiply color by reflecttint
+mul r0.rgb, r3, c1
++mov_sat r0.a, v0.a ; Necessary since v0.a may be negative
+add_sat r0.a, c1.a, r0.a
diff --git a/sp/src/materialsystem/stdshaders/WaterReflect_ps11.psh b/sp/src/materialsystem/stdshaders/WaterReflect_ps11.psh
index d31ab49c..785ced64 100644
--- a/sp/src/materialsystem/stdshaders/WaterReflect_ps11.psh
+++ b/sp/src/materialsystem/stdshaders/WaterReflect_ps11.psh
@@ -1,27 +1,27 @@
-ps.1.1
-
-; t0:
-; texture: dudv map
-; texcoords: dudvmap texcoords
-; t1:
-; texture: reflection render target
-; texcoords:
-; t2:
-; texture: normal map (usef for fresnel calculation)
-; texcoords:
-; t4: texture: normalization cube map
-; texcoords: eye vect
-
-tex t0 ; sample dudv map
-texbem t1, t0 ; reflection
-tex t2 ; normal map
-tex t3 ; eye vector (through normalization cubemap)
-
-; dot eye-vector with per-pixel normal from t2
-dp3_sat r1.rgba, t3_bx2, t2_bx2
-
-; run Fresnel approx. on it: R0 + (1-R0) (1-cos(q))^5
-mul r0.a, 1-r1.a, 1-r1.a // squared
-mul r0.a, r0.a, r0.a // quartic
-mul r0.rgb, t1, c0 // shove color from reflection render target into r0
+ps.1.1
+
+; t0:
+; texture: dudv map
+; texcoords: dudvmap texcoords
+; t1:
+; texture: reflection render target
+; texcoords:
+; t2:
+; texture: normal map (usef for fresnel calculation)
+; texcoords:
+; t4: texture: normalization cube map
+; texcoords: eye vect
+
+tex t0 ; sample dudv map
+texbem t1, t0 ; reflection
+tex t2 ; normal map
+tex t3 ; eye vector (through normalization cubemap)
+
+; dot eye-vector with per-pixel normal from t2
+dp3_sat r1.rgba, t3_bx2, t2_bx2
+
+; run Fresnel approx. on it: R0 + (1-R0) (1-cos(q))^5
+mul r0.a, 1-r1.a, 1-r1.a // squared
+mul r0.a, r0.a, r0.a // quartic
+mul r0.rgb, t1, c0 // shove color from reflection render target into r0
+mul_sat r0.a, r0.a, 1-r1.a // quintic \ No newline at end of file
diff --git a/sp/src/materialsystem/stdshaders/WaterRefractFresnel_ps11.psh b/sp/src/materialsystem/stdshaders/WaterRefractFresnel_ps11.psh
index 88d1f8dc..efade0f9 100644
--- a/sp/src/materialsystem/stdshaders/WaterRefractFresnel_ps11.psh
+++ b/sp/src/materialsystem/stdshaders/WaterRefractFresnel_ps11.psh
@@ -1,24 +1,24 @@
-ps.1.1
-
-; t0:
-; texture: dudv map
-; texcoords: dudvmap texcoords
-; t1:
-; texture: refraction render target
-; texcoords:
-
-tex t0 ; sample dudv map
-texbem t1, t0 ; refraction
-tex t2 ; The normal map
-tex t3 ; Normalize the tangent-space vector to the eye
-
-; dot eye-vector with per-pixel normal from t2
-dp3_sat r1.rgba, t2_bx2, t3_bx2
-
-mul r0.a, 1-r1.a, 1-r1.a ; squared
-mul r0.a, r0.a, r0.a ; quartic
-
-mul r0.rgb, t1, c0
-+mul_sat r0.a, r0.a, 1-r1.a ; quintic
-
-add_sat r0.a, r0.a, v0.a ; cheap water distance
+ps.1.1
+
+; t0:
+; texture: dudv map
+; texcoords: dudvmap texcoords
+; t1:
+; texture: refraction render target
+; texcoords:
+
+tex t0 ; sample dudv map
+texbem t1, t0 ; refraction
+tex t2 ; The normal map
+tex t3 ; Normalize the tangent-space vector to the eye
+
+; dot eye-vector with per-pixel normal from t2
+dp3_sat r1.rgba, t2_bx2, t3_bx2
+
+mul r0.a, 1-r1.a, 1-r1.a ; squared
+mul r0.a, r0.a, r0.a ; quartic
+
+mul r0.rgb, t1, c0
++mul_sat r0.a, r0.a, 1-r1.a ; quintic
+
+add_sat r0.a, r0.a, v0.a ; cheap water distance
diff --git a/sp/src/materialsystem/stdshaders/WaterRefract_ps11.psh b/sp/src/materialsystem/stdshaders/WaterRefract_ps11.psh
index 7e3ee733..fbe75475 100644
--- a/sp/src/materialsystem/stdshaders/WaterRefract_ps11.psh
+++ b/sp/src/materialsystem/stdshaders/WaterRefract_ps11.psh
@@ -1,13 +1,13 @@
-ps.1.1
-
-; t0:
-; texture: dudv map
-; texcoords: dudvmap texcoords
-; t1:
-; texture: refraction render target
-; texcoords:
-
-tex t0 ; sample dudv map
-texbem t1, t0 ; refraction
-
-mul r0, t1, c0
+ps.1.1
+
+; t0:
+; texture: dudv map
+; texcoords: dudvmap texcoords
+; t1:
+; texture: refraction render target
+; texcoords:
+
+tex t0 ; sample dudv map
+texbem t1, t0 ; refraction
+
+mul r0, t1, c0
diff --git a/sp/src/materialsystem/stdshaders/Water_ps14.psh b/sp/src/materialsystem/stdshaders/Water_ps14.psh
index e9daecd1..55e6b0ce 100644
--- a/sp/src/materialsystem/stdshaders/Water_ps14.psh
+++ b/sp/src/materialsystem/stdshaders/Water_ps14.psh
@@ -1,96 +1,96 @@
-; STATIC: "REFLECT" "0..1"
-; STATIC: "REFRACT" "0..1"
-ps.1.4
-; T2 - refraction
-; T3 - normal map
-; T4 - reflection
-; TC0 - normal map coords
-; TC1 - proj tex coords (reflection)
-; TC2 - proj tex coords (refraction)
-; TC3 - tangent space view vec
-; TC4 - displacement scale
-
-; sample normal map
-texld r3, t0
-
-#if REFLECT
-; reflection coords
-texcrd r4.xy, t1_dw.xyw
-#endif
-#if REFRACT
-; refraction coords
-texcrd r2.xy, t2_dw.xyw
-#endif
-; tangent space eye vector
-texld r1, t5 ; <---- Normalizing CUBE MAP here!!!
-; reflection/refraction scale (x,y)
-texcrd r0.xyz, t4.xyz
-
-; perturb coords by constant displacement
-; and by normal map alpha (which has 1/(2**miplevel in it)
-mul r0.rg, r0, r3.a
-#if REFLECT
-mad r4.rg, r3_bx2, r0.x, r4
-#endif
-
-#if REFRACT
-mad r2.rg, r3_bx2, r0.y, r2
-#endif
-
-; stuff something into z so that texld will deal
-#if REFLECT
-mov r4.b, c5
-#endif
-#if REFRACT
-mov r2.b, c5
-#endif
-
-phase
-
-#if REFLECT
-; reflection
-texld r4, r4
-#endif
-#if REFRACT
-; refraction
-texld r2, r2
-#endif
-
-#if REFLECT
-; N.V
-dp3_sat r1.a, r3_bx2, r1_bx2
-#endif
-
-#if REFRACT
-; tint refraction
-mul r2.rgb, r2, c1
-#endif
-
-#if REFLECT
-; tint reflction
-mul r4.rgb, r4, c4
-
-; (1-N.V) ^ 5
-+mul r0.a, 1-r1.a, 1-r1.a
-mul r0.a, r0.a, r0.a
-mul_sat r0.a, r0.a, 1-r1.a
-#endif
-
-#if !REFLECT && !REFRACT
-; This is wrong!!!!
-mov r0.rgba, c0
-#endif
-
-#if !REFLECT && REFRACT
-mov r0.rgba, r2
-#endif
-
-#if REFLECT && !REFRACT
-mov r0.rgba, r4
-#endif
-
-#if REFLECT && REFRACT
-; reflection * fresnel + refraction * ( 1 - fresnel )
-lrp r0.rgba, r0.a, r4, r2
-#endif
-
+; STATIC: "REFLECT" "0..1"
+; STATIC: "REFRACT" "0..1"
+ps.1.4
+; T2 - refraction
+; T3 - normal map
+; T4 - reflection
+; TC0 - normal map coords
+; TC1 - proj tex coords (reflection)
+; TC2 - proj tex coords (refraction)
+; TC3 - tangent space view vec
+; TC4 - displacement scale
+
+; sample normal map
+texld r3, t0
+
+#if REFLECT
+; reflection coords
+texcrd r4.xy, t1_dw.xyw
+#endif
+#if REFRACT
+; refraction coords
+texcrd r2.xy, t2_dw.xyw
+#endif
+; tangent space eye vector
+texld r1, t5 ; <---- Normalizing CUBE MAP here!!!
+; reflection/refraction scale (x,y)
+texcrd r0.xyz, t4.xyz
+
+; perturb coords by constant displacement
+; and by normal map alpha (which has 1/(2**miplevel in it)
+mul r0.rg, r0, r3.a
+#if REFLECT
+mad r4.rg, r3_bx2, r0.x, r4
+#endif
+
+#if REFRACT
+mad r2.rg, r3_bx2, r0.y, r2
+#endif
+
+; stuff something into z so that texld will deal
+#if REFLECT
+mov r4.b, c5
+#endif
+#if REFRACT
+mov r2.b, c5
+#endif
+
+phase
+
+#if REFLECT
+; reflection
+texld r4, r4
+#endif
+#if REFRACT
+; refraction
+texld r2, r2
+#endif
+
+#if REFLECT
+; N.V
+dp3_sat r1.a, r3_bx2, r1_bx2
+#endif
+
+#if REFRACT
+; tint refraction
+mul r2.rgb, r2, c1
+#endif
+
+#if REFLECT
+; tint reflction
+mul r4.rgb, r4, c4
+
+; (1-N.V) ^ 5
++mul r0.a, 1-r1.a, 1-r1.a
+mul r0.a, r0.a, r0.a
+mul_sat r0.a, r0.a, 1-r1.a
+#endif
+
+#if !REFLECT && !REFRACT
+; This is wrong!!!!
+mov r0.rgba, c0
+#endif
+
+#if !REFLECT && REFRACT
+mov r0.rgba, r2
+#endif
+
+#if REFLECT && !REFRACT
+mov r0.rgba, r4
+#endif
+
+#if REFLECT && REFRACT
+; reflection * fresnel + refraction * ( 1 - fresnel )
+lrp r0.rgba, r0.a, r4, r2
+#endif
+
diff --git a/sp/src/materialsystem/stdshaders/WorldTexture.psh b/sp/src/materialsystem/stdshaders/WorldTexture.psh
index 6144fdf2..933435bf 100644
--- a/sp/src/materialsystem/stdshaders/WorldTexture.psh
+++ b/sp/src/materialsystem/stdshaders/WorldTexture.psh
@@ -1,14 +1,14 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-; Get the color from the texture
-tex t0
-mov r0, t0
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+; Get the color from the texture
+tex t0
+mov r0, t0
+
diff --git a/sp/src/materialsystem/stdshaders/WorldTwoTextureBlend.psh b/sp/src/materialsystem/stdshaders/WorldTwoTextureBlend.psh
index b9494b02..a3f3c6a4 100644
--- a/sp/src/materialsystem/stdshaders/WorldTwoTextureBlend.psh
+++ b/sp/src/materialsystem/stdshaders/WorldTwoTextureBlend.psh
@@ -1,21 +1,21 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-tex t2
-
-mov r0.rgb, t0 +
-mul r0.a, t0.a, v0.a ; Grab alpha from vertex color
-
-lrp r0.rgb, t2.a, t2, r0 ; Base = base * (1 - detail alpha) + detail * detail alpha
-mul r0.rgb, r0, v0 ; modulate by vertex color
-mul r0.rgb, t1, r0 ; fold in lightmap (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+tex t2
+
+mov r0.rgb, t0 +
+mul r0.a, t0.a, v0.a ; Grab alpha from vertex color
+
+lrp r0.rgb, t2.a, t2, r0 ; Base = base * (1 - detail alpha) + detail * detail alpha
+mul r0.rgb, r0, v0 ; modulate by vertex color
+mul r0.rgb, t1, r0 ; fold in lightmap (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/WorldTwoTextureBlend_DetailAlpha.psh b/sp/src/materialsystem/stdshaders/WorldTwoTextureBlend_DetailAlpha.psh
index 033730bb..d5e07368 100644
--- a/sp/src/materialsystem/stdshaders/WorldTwoTextureBlend_DetailAlpha.psh
+++ b/sp/src/materialsystem/stdshaders/WorldTwoTextureBlend_DetailAlpha.psh
@@ -1,25 +1,25 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-def c1, 1.0f, 1.0f, 1.0f, 1.0f
-
-tex t0
-tex t1
-tex t2
-
-mov_x2_sat r0.rgb, t0 + ; r0 = sat( t0 * 2 )
-mul r0.a, t0.a, v0.a ; Grab alpha from vertex color
-
-lrp_sat r0.rgb, t2.a, r0, c1 ; r0 = B*Da + (1-Da)
-
-mul r0.rgb, r0, t2 ; modulate by detail color
-mul r0.rgb, r0, v0 ; modulate by vertex color
-mul r0.rgb, t1, r0 ; fold in lightmap (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+def c1, 1.0f, 1.0f, 1.0f, 1.0f
+
+tex t0
+tex t1
+tex t2
+
+mov_x2_sat r0.rgb, t0 + ; r0 = sat( t0 * 2 )
+mul r0.a, t0.a, v0.a ; Grab alpha from vertex color
+
+lrp_sat r0.rgb, t2.a, r0, c1 ; r0 = B*Da + (1-Da)
+
+mul r0.rgb, r0, t2 ; modulate by detail color
+mul r0.rgb, r0, v0 ; modulate by vertex color
+mul r0.rgb, t1, r0 ; fold in lightmap (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/WorldTwoTextureBlend_SelfIlluminated.psh b/sp/src/materialsystem/stdshaders/WorldTwoTextureBlend_SelfIlluminated.psh
index 2f5a8ca5..75ce4b5d 100644
--- a/sp/src/materialsystem/stdshaders/WorldTwoTextureBlend_SelfIlluminated.psh
+++ b/sp/src/materialsystem/stdshaders/WorldTwoTextureBlend_SelfIlluminated.psh
@@ -1,27 +1,27 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-tex t2
-
-mov r0.rgb, t0 +
-mov r0.a, v0.a ; Grab alpha from vertex color
-
-lrp r0.rgb, t2.a, t2, r0 ; Base = base * (1 - detail alpha) + detail * detail alpha
-mul r0.rgb, r0, v0 ; modulate by vertex color
-mul r0.rgb, t1, r0 ; fold in lightmap (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-mul r1.rgb, c1, t0 ; Self illum * tint
-+ mul r1.a, t0.a, 1-t2.a ; Reduce self-illum amount based on 1 - detailalpha
-
-lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lightmap
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+tex t2
+
+mov r0.rgb, t0 +
+mov r0.a, v0.a ; Grab alpha from vertex color
+
+lrp r0.rgb, t2.a, t2, r0 ; Base = base * (1 - detail alpha) + detail * detail alpha
+mul r0.rgb, r0, v0 ; modulate by vertex color
+mul r0.rgb, t1, r0 ; fold in lightmap (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+mul r1.rgb, c1, t0 ; Self illum * tint
++ mul r1.a, t0.a, 1-t2.a ; Reduce self-illum amount based on 1 - detailalpha
+
+lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lightmap
+
diff --git a/sp/src/materialsystem/stdshaders/WorldVertexAlpha.psh b/sp/src/materialsystem/stdshaders/WorldVertexAlpha.psh
index e610452e..67e6a1e3 100644
--- a/sp/src/materialsystem/stdshaders/WorldVertexAlpha.psh
+++ b/sp/src/materialsystem/stdshaders/WorldVertexAlpha.psh
@@ -1,10 +1,10 @@
-ps.1.1
-
-tex t0 ; basetexture
-tex t1 ; lightmap
-
-mov r0.a, 1-t1.a
-;mov r0.rgb, t0 ; * 2 * (overbrightFactor/2)
-;mov_x2 r0.rgb, t0 ; * 2 * (overbrightFactor/2)
-mul r0.rgb, t0, t1;
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+tex t0 ; basetexture
+tex t1 ; lightmap
+
+mov r0.a, 1-t1.a
+;mov r0.rgb, t0 ; * 2 * (overbrightFactor/2)
+;mov_x2 r0.rgb, t0 ; * 2 * (overbrightFactor/2)
+mul r0.rgb, t0, t1;
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/WorldVertexTransition.psh b/sp/src/materialsystem/stdshaders/WorldVertexTransition.psh
index 4fd2882b..76249b3d 100644
--- a/sp/src/materialsystem/stdshaders/WorldVertexTransition.psh
+++ b/sp/src/materialsystem/stdshaders/WorldVertexTransition.psh
@@ -1,18 +1,18 @@
-; STATIC: "DETAIL" "0..1"
-ps.1.1
-
-tex t0 ; basetexture
-tex t1 ; basetexture2
-tex t2 ; lightmap
-#if DETAIL
-tex t3 ; detail
-#endif
-
-mov_sat r1.a, v0.a
-lrp r0, r1.a, t1, t0
-
-mul r0, r0, t2
-#if DETAIL
-mul_x2 r0.rgb, r0, t3
-#endif
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+; STATIC: "DETAIL" "0..1"
+ps.1.1
+
+tex t0 ; basetexture
+tex t1 ; basetexture2
+tex t2 ; lightmap
+#if DETAIL
+tex t3 ; detail
+#endif
+
+mov_sat r1.a, v0.a
+lrp r0, r1.a, t1, t0
+
+mul r0, r0, t2
+#if DETAIL
+mul_x2 r0.rgb, r0, t3
+#endif
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/WorldVertexTransition_BlendBase2.psh b/sp/src/materialsystem/stdshaders/WorldVertexTransition_BlendBase2.psh
index d4a5c623..6c959f1a 100644
--- a/sp/src/materialsystem/stdshaders/WorldVertexTransition_BlendBase2.psh
+++ b/sp/src/materialsystem/stdshaders/WorldVertexTransition_BlendBase2.psh
@@ -1,16 +1,16 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-mul r0.rgb, t1, t0 ; fold in lightmap (color)
-+mov r0.a, v0.a ; fold in lightmap (alpha)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+mul r0.rgb, t1, t0 ; fold in lightmap (color)
++mov r0.a, v0.a ; fold in lightmap (alpha)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
diff --git a/sp/src/materialsystem/stdshaders/WorldVertexTransition_Editor.psh b/sp/src/materialsystem/stdshaders/WorldVertexTransition_Editor.psh
index 936edc9e..a8181280 100644
--- a/sp/src/materialsystem/stdshaders/WorldVertexTransition_Editor.psh
+++ b/sp/src/materialsystem/stdshaders/WorldVertexTransition_Editor.psh
@@ -1,10 +1,10 @@
-ps.1.1
-
-tex t0 ; basetexture
-tex t1 ; basetexture2
-tex t2 ; lightmap
-
-; The editor uses vertex alpha as the blend factor
-lrp r0, 1-v0.a, t1, t0
-mul r0, r0, t2
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+tex t0 ; basetexture
+tex t1 ; basetexture2
+tex t2 ; lightmap
+
+; The editor uses vertex alpha as the blend factor
+lrp r0, 1-v0.a, t1, t0
+mul r0, r0, t2
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/WorldVertexTransition_Seamless.psh b/sp/src/materialsystem/stdshaders/WorldVertexTransition_Seamless.psh
index 8d4edad0..db9d0cd6 100644
--- a/sp/src/materialsystem/stdshaders/WorldVertexTransition_Seamless.psh
+++ b/sp/src/materialsystem/stdshaders/WorldVertexTransition_Seamless.psh
@@ -1,23 +1,23 @@
-ps.1.1
-
-def c0, 1.0f, 0.0f, 0.0f, 0.0f
-def c1, 0.0f, 1.0f, 0.0f, 0.0f
-def c2, 0.0f, 0.0f, 1.0f, 0.0f
-
-tex t0 ; basetexture zy
-tex t1 ; basetexture xz
-tex t2 ; basetexture xy
-tex t3 ; lightmap
-
-dp3_sat r1, v0, c0
-mul r0, t0, r1
-
-dp3_sat r1, v0, c1
-mad r0, t1, r1, r0
-
-dp3_sat r1, v0, c2
-mad r0, t2, r1, r0
-
-; multiply by lightmap
-mul_x2 r0.rgb, r0, t3
-+mov r0.a, v0 ; $vColor
+ps.1.1
+
+def c0, 1.0f, 0.0f, 0.0f, 0.0f
+def c1, 0.0f, 1.0f, 0.0f, 0.0f
+def c2, 0.0f, 0.0f, 1.0f, 0.0f
+
+tex t0 ; basetexture zy
+tex t1 ; basetexture xz
+tex t2 ; basetexture xy
+tex t3 ; lightmap
+
+dp3_sat r1, v0, c0
+mul r0, t0, r1
+
+dp3_sat r1, v0, c1
+mad r0, t1, r1, r0
+
+dp3_sat r1, v0, c2
+mad r0, t2, r1, r0
+
+; multiply by lightmap
+mul_x2 r0.rgb, r0, t3
++mov r0.a, v0 ; $vColor
diff --git a/sp/src/materialsystem/stdshaders/WorldVertexTransition_ps14.psh b/sp/src/materialsystem/stdshaders/WorldVertexTransition_ps14.psh
index 763a5d11..3ddfa02c 100644
--- a/sp/src/materialsystem/stdshaders/WorldVertexTransition_ps14.psh
+++ b/sp/src/materialsystem/stdshaders/WorldVertexTransition_ps14.psh
@@ -1,32 +1,32 @@
-; STATIC: "DETAIL" "0..1"
-; STATIC: "BLENDMODULATETEXTURE" "0..1"
-ps.1.4
-
-def c1, 3.0, -2.0, 0.5, 0.5
-
-texld r0, t0
-texld r1, t1
-texld r2, t2
-#if DETAIL
-texld r3, t3 ; detail
-#endif
-#if BLENDMODULATETEXTURE
-texld r4, t4 ; detail
-#endif
-
-#if BLEND_MODULATETEXTURE
-sub r5.a, v0.a, r4.g
-add_sat r5.a, r5.a, c1.a
-mad r6.a, c1.g, r5.a, c1.r
-mul r6.a, r6.a, r5.a
-mul r5.a, r6.a, r5.a
-#else
-mov_sat r5.a, v0.a
-#endif
-lrp r0, r5.a, r1, r0
-
-mul r0, r0, r2
-#if DETAIL
-mul_x2 r0.rgb, r0, r3
-#endif
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+; STATIC: "DETAIL" "0..1"
+; STATIC: "BLENDMODULATETEXTURE" "0..1"
+ps.1.4
+
+def c1, 3.0, -2.0, 0.5, 0.5
+
+texld r0, t0
+texld r1, t1
+texld r2, t2
+#if DETAIL
+texld r3, t3 ; detail
+#endif
+#if BLENDMODULATETEXTURE
+texld r4, t4 ; detail
+#endif
+
+#if BLEND_MODULATETEXTURE
+sub r5.a, v0.a, r4.g
+add_sat r5.a, r5.a, c1.a
+mad r6.a, c1.g, r5.a, c1.r
+mul r6.a, r6.a, r5.a
+mul r5.a, r6.a, r5.a
+#else
+mov_sat r5.a, v0.a
+#endif
+lrp r0, r5.a, r1, r0
+
+mul r0, r0, r2
+#if DETAIL
+mul_x2 r0.rgb, r0, r3
+#endif
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/cloud_ps11.psh b/sp/src/materialsystem/stdshaders/cloud_ps11.psh
index 8e5627cb..82ed1d60 100644
--- a/sp/src/materialsystem/stdshaders/cloud_ps11.psh
+++ b/sp/src/materialsystem/stdshaders/cloud_ps11.psh
@@ -1,6 +1,6 @@
-ps.1.1
-
-tex t0
-tex t1
-
-mul r0, t0, t1
+ps.1.1
+
+tex t0
+tex t1
+
+mul r0, t0, t1
diff --git a/sp/src/materialsystem/stdshaders/detail_ps11.psh b/sp/src/materialsystem/stdshaders/detail_ps11.psh
index fb5916ab..8c49af16 100644
--- a/sp/src/materialsystem/stdshaders/detail_ps11.psh
+++ b/sp/src/materialsystem/stdshaders/detail_ps11.psh
@@ -1,12 +1,12 @@
-ps.1.1
-
-tex t0
-tex t1
-
-mul r0.rgb, t0, v0 +
-
-; handle distance fade
-sub r0.a, t0.a, 1-v0.a
-
-sub r0.a, r0.a, t1_bias.a
-cnd r0.a, r0.a, c0.a, c1.a
+ps.1.1
+
+tex t0
+tex t1
+
+mul r0.rgb, t0, v0 +
+
+; handle distance fade
+sub r0.a, t0.a, 1-v0.a
+
+sub r0.a, r0.a, t1_bias.a
+cnd r0.a, r0.a, c0.a, c1.a
diff --git a/sp/src/materialsystem/stdshaders/eyes_flashlight2_ps11.psh b/sp/src/materialsystem/stdshaders/eyes_flashlight2_ps11.psh
index 3b02fbb3..6cc5493e 100644
--- a/sp/src/materialsystem/stdshaders/eyes_flashlight2_ps11.psh
+++ b/sp/src/materialsystem/stdshaders/eyes_flashlight2_ps11.psh
@@ -1,17 +1,17 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw stuff
-;------------------------------------------------------------------------------
-
-tex t0 ; Contains spotlight
-tex t1 ; Contains base texture
-tex t2 ; Normalize world pos to light
-tex t3 ; Sample iris
-
-dp3 r0, t2_bx2, v0_bx2 ; r0 = N dot L
-lrp r1.rgb, t3.a, t3, t1 ; r1 = lerp( baseColor, irisSample.xyz, irisSample.a )
-mul r0.rgb, r0_sat, r1 ; Saturate ( N dot L )* lerp
-mul r0.rgb, r0, v0.a ; *= attenuation
-mul_x2 r0.rgb, r0, t0 + ; *= 2 * spotlight
-mov r0.a, t1.a
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw stuff
+;------------------------------------------------------------------------------
+
+tex t0 ; Contains spotlight
+tex t1 ; Contains base texture
+tex t2 ; Normalize world pos to light
+tex t3 ; Sample iris
+
+dp3 r0, t2_bx2, v0_bx2 ; r0 = N dot L
+lrp r1.rgb, t3.a, t3, t1 ; r1 = lerp( baseColor, irisSample.xyz, irisSample.a )
+mul r0.rgb, r0_sat, r1 ; Saturate ( N dot L )* lerp
+mul r0.rgb, r0, v0.a ; *= attenuation
+mul_x2 r0.rgb, r0, t0 + ; *= 2 * spotlight
+mov r0.a, t1.a
diff --git a/sp/src/materialsystem/stdshaders/flesh_interior_blended_pass_dx8_ps11.psh b/sp/src/materialsystem/stdshaders/flesh_interior_blended_pass_dx8_ps11.psh
index fc7e32a9..a9e675d4 100644
--- a/sp/src/materialsystem/stdshaders/flesh_interior_blended_pass_dx8_ps11.psh
+++ b/sp/src/materialsystem/stdshaders/flesh_interior_blended_pass_dx8_ps11.psh
@@ -1,15 +1,15 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; c5 1, 1, 1, 1
-;------------------------------------------------------------------------------
-
-tex t0 ; Base color
-
-mul r0, v0, v0 ; // Mask^2
-mul r0, r0, r0 ; // Mask^4
-sub r0, c5, r0 ; // 1.0 - Mask^4
-
-mul r0.rgb, r0, t0 ; // * Flesh texture color
-mul r0.a, r0.a, t0.a ; // * Flesh X-rated mask
-mul r0.a, r0.a, v1.a ; // * Fresnel mask
+ps.1.1
+
+;------------------------------------------------------------------------------
+; c5 1, 1, 1, 1
+;------------------------------------------------------------------------------
+
+tex t0 ; Base color
+
+mul r0, v0, v0 ; // Mask^2
+mul r0, r0, r0 ; // Mask^4
+sub r0, c5, r0 ; // 1.0 - Mask^4
+
+mul r0.rgb, r0, t0 ; // * Flesh texture color
+mul r0.a, r0.a, t0.a ; // * Flesh X-rated mask
+mul r0.a, r0.a, v1.a ; // * Fresnel mask
diff --git a/sp/src/materialsystem/stdshaders/lightmappedgeneric_basealphamaskedenvmap.psh b/sp/src/materialsystem/stdshaders/lightmappedgeneric_basealphamaskedenvmap.psh
index fbb4393f..80e6db4e 100644
--- a/sp/src/materialsystem/stdshaders/lightmappedgeneric_basealphamaskedenvmap.psh
+++ b/sp/src/materialsystem/stdshaders/lightmappedgeneric_basealphamaskedenvmap.psh
@@ -1,22 +1,22 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c1 - self-illum tint
-; c2 - envmap tint
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-tex t2
-tex t3
-
-mul r0, t0, v0 ; base times vertex color (with alpha)
-mul r1, t2, 1-t3.a ; envmap * envmapmask alpha
-mad r0.rgb, r1, c2, r0 ; + envmap * envmapmask * envmaptint (color only)
-mul r0.rgb, t1, r0 ; fold in lighting (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c1 - self-illum tint
+; c2 - envmap tint
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+tex t2
+tex t3
+
+mul r0, t0, v0 ; base times vertex color (with alpha)
+mul r1, t2, 1-t3.a ; envmap * envmapmask alpha
+mad r0.rgb, r1, c2, r0 ; + envmap * envmapmask * envmaptint (color only)
+mul r0.rgb, t1, r0 ; fold in lighting (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/lightmappedgeneric_basetextureblend.psh b/sp/src/materialsystem/stdshaders/lightmappedgeneric_basetextureblend.psh
index 9380ec63..9ca0eeb0 100644
--- a/sp/src/materialsystem/stdshaders/lightmappedgeneric_basetextureblend.psh
+++ b/sp/src/materialsystem/stdshaders/lightmappedgeneric_basetextureblend.psh
@@ -1,9 +1,9 @@
-ps.1.1
-
-tex t0 ; base 1
-tex t1 ; base 2
-
-mov r1, t1
-lrp r0, 1-v0.a, t0, r1
-mul r0, r0, c0
-
+ps.1.1
+
+tex t0 ; base 1
+tex t1 ; base 2
+
+mov r1, t1
+lrp r0, 1-v0.a, t0, r1
+mul r0, r0, c0
+
diff --git a/sp/src/materialsystem/stdshaders/lightmappedgeneric_envmap.psh b/sp/src/materialsystem/stdshaders/lightmappedgeneric_envmap.psh
index 1e4a2bc4..49217fee 100644
--- a/sp/src/materialsystem/stdshaders/lightmappedgeneric_envmap.psh
+++ b/sp/src/materialsystem/stdshaders/lightmappedgeneric_envmap.psh
@@ -1,20 +1,20 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c1 - self-illum tint
-; c2 - envmap tint
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-tex t2
-
-mul r0, t0, v0 ; base times vertex color (with alpha)
-mad r0.rgb, t2, c2, r0 ; + envmap * envmaptint (color only)
-mul r0.rgb, t1, r0 ; fold in lightmap (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c1 - self-illum tint
+; c2 - envmap tint
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+tex t2
+
+mul r0, t0, v0 ; base times vertex color (with alpha)
+mad r0.rgb, t2, c2, r0 ; + envmap * envmaptint (color only)
+mul r0.rgb, t1, r0 ; fold in lightmap (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/lightmappedgeneric_maskedenvmap.psh b/sp/src/materialsystem/stdshaders/lightmappedgeneric_maskedenvmap.psh
index 4f72286f..980269a1 100644
--- a/sp/src/materialsystem/stdshaders/lightmappedgeneric_maskedenvmap.psh
+++ b/sp/src/materialsystem/stdshaders/lightmappedgeneric_maskedenvmap.psh
@@ -1,22 +1,22 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c1 - self-illum tint
-; c2 - envmap tint
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-tex t2
-tex t3
-
-mul r0, t0, v0 ; base times vertex color (with alpha)
-mul r1, t2, t3 ; envmap * envmapmask
-mad r0.rgb, r1, c2, r0 ; + envmap * envmapmask * envmaptint (color only)
-mul r0.rgb, t1, r0 ; fold in lighting (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c1 - self-illum tint
+; c2 - envmap tint
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+tex t2
+tex t3
+
+mul r0, t0, v0 ; base times vertex color (with alpha)
+mul r1, t2, t3 ; envmap * envmapmask
+mad r0.rgb, r1, c2, r0 ; + envmap * envmapmask * envmaptint (color only)
+mul r0.rgb, t1, r0 ; fold in lighting (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/lightmappedgeneric_multiplybylightingbasealphamaskedselfillum.psh b/sp/src/materialsystem/stdshaders/lightmappedgeneric_multiplybylightingbasealphamaskedselfillum.psh
index a525a7b2..47902397 100644
--- a/sp/src/materialsystem/stdshaders/lightmappedgeneric_multiplybylightingbasealphamaskedselfillum.psh
+++ b/sp/src/materialsystem/stdshaders/lightmappedgeneric_multiplybylightingbasealphamaskedselfillum.psh
@@ -1,24 +1,24 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-
-; Blend between grey and lightmap color based on total alpha
-
-def c0 0.5f 0.5f 0.5f 1.0f
-
-mul_x2 r1.rgb, c0, t1 ; Apply overbright to lightmap
-+ mul r1.a, t0, v0 ; base times vertex alpha
-; GR - workaround for const/lerp issues
-mul r0.rgb, c1, t0 ; Self illum * tint
-+mul_sat r0.a, c1, t0
-lrp r1.rgb, t0.a, r1, r0 ; Blend between self-illum + lightmap
-lrp r0, r1.a, r1, c0 ; interpolate between grey + color
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+
+; Blend between grey and lightmap color based on total alpha
+
+def c0 0.5f 0.5f 0.5f 1.0f
+
+mul_x2 r1.rgb, c0, t1 ; Apply overbright to lightmap
++ mul r1.a, t0, v0 ; base times vertex alpha
+; GR - workaround for const/lerp issues
+mul r0.rgb, c1, t0 ; Self illum * tint
++mul_sat r0.a, c1, t0
+lrp r1.rgb, t0.a, r1, r0 ; Blend between self-illum + lightmap
+lrp r0, r1.a, r1, c0 ; interpolate between grey + color
diff --git a/sp/src/materialsystem/stdshaders/lightmappedgeneric_multiplybylightingbasenotexture.psh b/sp/src/materialsystem/stdshaders/lightmappedgeneric_multiplybylightingbasenotexture.psh
index 77b05b9f..8cc6b4cc 100644
--- a/sp/src/materialsystem/stdshaders/lightmappedgeneric_multiplybylightingbasenotexture.psh
+++ b/sp/src/materialsystem/stdshaders/lightmappedgeneric_multiplybylightingbasenotexture.psh
@@ -1,20 +1,20 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-
-; Blend between grey and lightmap color based on total alpha
-
-def c2, 0.5f, 0.5f, 0.5f, 1.0f
-
-mul_x2 r1.rgb, c0, t1 ; Apply overbright to lightmap
-+ mov r1.a, v0 ; vertex alpha
-lrp r0, r1.a, r1, c2 ; interpolate between grey + color
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+
+; Blend between grey and lightmap color based on total alpha
+
+def c2, 0.5f, 0.5f, 0.5f, 1.0f
+
+mul_x2 r1.rgb, c0, t1 ; Apply overbright to lightmap
++ mov r1.a, v0 ; vertex alpha
+lrp r0, r1.a, r1, c2 ; interpolate between grey + color
diff --git a/sp/src/materialsystem/stdshaders/lightmappedgeneric_selfilluminatedenvmap.psh b/sp/src/materialsystem/stdshaders/lightmappedgeneric_selfilluminatedenvmap.psh
index 84b56437..4c80db2f 100644
--- a/sp/src/materialsystem/stdshaders/lightmappedgeneric_selfilluminatedenvmap.psh
+++ b/sp/src/materialsystem/stdshaders/lightmappedgeneric_selfilluminatedenvmap.psh
@@ -1,27 +1,27 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c1 - self-illum tint
-; c2 - envmap tint
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-tex t2
-
-mul r0.rgb, t0, v0 + ; base times vertex color (no alpha)
-mov r0.a, v0.a ; Grab alpha from vertex color
-
-mad r0.rgb, t2, c2, r0 ; + envmap * envmaptint (color only)
-
-mul r0.rgb, t1, r0 ; fold in lighting (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-mul r1, t0, c1 ; Self illum * tint
-lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c1 - self-illum tint
+; c2 - envmap tint
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+tex t2
+
+mul r0.rgb, t0, v0 + ; base times vertex color (no alpha)
+mov r0.a, v0.a ; Grab alpha from vertex color
+
+mad r0.rgb, t2, c2, r0 ; + envmap * envmaptint (color only)
+
+mul r0.rgb, t1, r0 ; fold in lighting (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+mul r1, t0, c1 ; Self illum * tint
+lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
+
diff --git a/sp/src/materialsystem/stdshaders/lightmappedgeneric_selfilluminatedmaskedenvmap.psh b/sp/src/materialsystem/stdshaders/lightmappedgeneric_selfilluminatedmaskedenvmap.psh
index b4893363..78072123 100644
--- a/sp/src/materialsystem/stdshaders/lightmappedgeneric_selfilluminatedmaskedenvmap.psh
+++ b/sp/src/materialsystem/stdshaders/lightmappedgeneric_selfilluminatedmaskedenvmap.psh
@@ -1,27 +1,27 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; c1 - self-illum tint
-; c2 - envmap tint
-;------------------------------------------------------------------------------
-
-tex t0
-tex t1
-tex t2
-tex t3
-
-mul r0.rgb, t0, v0 + ; base times vertex color (with alpha)
-mov r0.a, v0.a ; Grab alpha from vertex color
-
-mul r1, t2, t3 ; envmap * envmapmask
-mad r0.rgb, r1, c2, r0 ; + envmap * envmapmask * envmaptint (color only)
-
-mul r1, c1, t0.a ; Self illum alpha * tint
-mad r1, t0, r1, t1 ; Self illum * tint + lightmap
-mul r0.rgb, r1, r0 ; fold in lighting (color only)
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; c1 - self-illum tint
+; c2 - envmap tint
+;------------------------------------------------------------------------------
+
+tex t0
+tex t1
+tex t2
+tex t3
+
+mul r0.rgb, t0, v0 + ; base times vertex color (with alpha)
+mov r0.a, v0.a ; Grab alpha from vertex color
+
+mul r1, t2, t3 ; envmap * envmapmask
+mad r0.rgb, r1, c2, r0 ; + envmap * envmapmask * envmaptint (color only)
+
+mul r1, c1, t0.a ; Self illum alpha * tint
+mad r1, t0, r1, t1 ; Self illum * tint + lightmap
+mul r0.rgb, r1, r0 ; fold in lighting (color only)
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/sprite_ps11.psh b/sp/src/materialsystem/stdshaders/sprite_ps11.psh
index 5f5def5b..021246d1 100644
--- a/sp/src/materialsystem/stdshaders/sprite_ps11.psh
+++ b/sp/src/materialsystem/stdshaders/sprite_ps11.psh
@@ -1,15 +1,15 @@
-; STATIC: "VERTEXCOLOR" "0..1"
-; STATIC: "CONSTANTCOLOR" "0..1"
-
-ps.1.1
-
-tex t0
-mov r0, t0
-
-#if VERTEXCOLOR
-mul r0, r0, v0
-#endif
-
-#if CONSTANTCOLOR
-mul r0, r0, c0
+; STATIC: "VERTEXCOLOR" "0..1"
+; STATIC: "CONSTANTCOLOR" "0..1"
+
+ps.1.1
+
+tex t0
+mov r0, t0
+
+#if VERTEXCOLOR
+mul r0, r0, v0
+#endif
+
+#if CONSTANTCOLOR
+mul r0, r0, c0
#endif \ No newline at end of file
diff --git a/sp/src/materialsystem/stdshaders/unlitgeneric_basetimesdetail.psh b/sp/src/materialsystem/stdshaders/unlitgeneric_basetimesdetail.psh
index 8f9139df..563845de 100644
--- a/sp/src/materialsystem/stdshaders/unlitgeneric_basetimesdetail.psh
+++ b/sp/src/materialsystem/stdshaders/unlitgeneric_basetimesdetail.psh
@@ -1,24 +1,24 @@
-ps.1.1
-def c0,0,0,0,.1
-def c1,0,0,0,.1
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-; tc3 - detail texcoords
-;
-; c3 = outline color
-;------------------------------------------------------------------------------
-
-tex t0 ; base color
-tex t3 ; detail mask
-
-mul r1,t0,t3 ; multiply
-
-mov r0.rgb, c3 ; color = outline color
-;add r0.a, r1.a, c0.a
-;cnd r0.rgb, r0.a, r0, r1 ; if ( alpha+c0 > 0.5 ) color = outline, else color = base
-sub r0.a, r1.a, c1.a
-cnd r0.rgb, r0.a, r1, r0 ; if ( alpha -c1 > 0.5) color=base
+ps.1.1
+def c0,0,0,0,.1
+def c1,0,0,0,.1
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+; tc3 - detail texcoords
+;
+; c3 = outline color
+;------------------------------------------------------------------------------
+
+tex t0 ; base color
+tex t3 ; detail mask
+
+mul r1,t0,t3 ; multiply
+
+mov r0.rgb, c3 ; color = outline color
+;add r0.a, r1.a, c0.a
+;cnd r0.rgb, r0.a, r0, r1 ; if ( alpha+c0 > 0.5 ) color = outline, else color = base
+sub r0.a, r1.a, c1.a
+cnd r0.rgb, r0.a, r1, r0 ; if ( alpha -c1 > 0.5) color=base
diff --git a/sp/src/materialsystem/stdshaders/vertexlit_notexture.psh b/sp/src/materialsystem/stdshaders/vertexlit_notexture.psh
index 8b550bde..5241abd7 100644
--- a/sp/src/materialsystem/stdshaders/vertexlit_notexture.psh
+++ b/sp/src/materialsystem/stdshaders/vertexlit_notexture.psh
@@ -1,13 +1,13 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-mov r0, v0
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+mov r0, v0
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
diff --git a/sp/src/materialsystem/stdshaders/vertexlitgeneric_basealphamaskedenvmap.psh b/sp/src/materialsystem/stdshaders/vertexlitgeneric_basealphamaskedenvmap.psh
index 5faa681d..db80aefd 100644
--- a/sp/src/materialsystem/stdshaders/vertexlitgeneric_basealphamaskedenvmap.psh
+++ b/sp/src/materialsystem/stdshaders/vertexlitgeneric_basealphamaskedenvmap.psh
@@ -1,19 +1,19 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0 ; base color
-tex t1 ; cube map
-tex t2 ; envmap mask (in alpha channel)
-
-mul r0, t0, c3 ; base times modulation
-mul r1, t1, 1-t2.a ; Envmap * mask (in alpha channel)
-mad r0.rgb, r1, c2, r0 ; Base * mod + envmap * mask * tint
-mul r0.rgb, v0, r0 ; apply vertex lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0 ; base color
+tex t1 ; cube map
+tex t2 ; envmap mask (in alpha channel)
+
+mul r0, t0, c3 ; base times modulation
+mul r1, t1, 1-t2.a ; Envmap * mask (in alpha channel)
+mad r0.rgb, r1, c2, r0 ; Base * mod + envmap * mask * tint
+mul r0.rgb, v0, r0 ; apply vertex lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailbasealphamaskedenvmap.psh b/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailbasealphamaskedenvmap.psh
index ab653f19..82989f4e 100644
--- a/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailbasealphamaskedenvmap.psh
+++ b/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailbasealphamaskedenvmap.psh
@@ -1,21 +1,21 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0 ; base color
-tex t1 ; cube map
-tex t2 ; envmap mask (in alpha channel)
-tex t3 ; detail texture
-
-mul r0, t0, c3 ; base times modulation
-mul_x2 r0.rgb, r0, t3 ; detail texture
-mul r1, t1, 1-t2.a ; Envmap * mask (in alpha channel)
-mad r0.rgb, r1, c2, r0 ; Base * mod + envmap * mask * tint
-mul r0.rgb, v0, r0 ; apply vertex lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0 ; base color
+tex t1 ; cube map
+tex t2 ; envmap mask (in alpha channel)
+tex t3 ; detail texture
+
+mul r0, t0, c3 ; base times modulation
+mul_x2 r0.rgb, r0, t3 ; detail texture
+mul r1, t1, 1-t2.a ; Envmap * mask (in alpha channel)
+mad r0.rgb, r1, c2, r0 ; Base * mod + envmap * mask * tint
+mul r0.rgb, v0, r0 ; apply vertex lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailenvmap.psh b/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailenvmap.psh
index ac030f0a..e95d932b 100644
--- a/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailenvmap.psh
+++ b/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailenvmap.psh
@@ -1,19 +1,19 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0 ; base color
-tex t1 ; cube map
-tex t3 ; detail texture
-
-mul r0, t0, c3 ; base times modulation
-mul_x2 r0.rgb, r0, t3 ; detail texture
-mad r0.rgb, t1, c2, r0 ; + envmap * envmaptint (color only)
-mul r0.rgb, v0, r0 ; apply vertex lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0 ; base color
+tex t1 ; cube map
+tex t3 ; detail texture
+
+mul r0, t0, c3 ; base times modulation
+mul_x2 r0.rgb, r0, t3 ; detail texture
+mad r0.rgb, t1, c2, r0 ; + envmap * envmaptint (color only)
+mul r0.rgb, v0, r0 ; apply vertex lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailmaskedenvmap.psh b/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailmaskedenvmap.psh
index 51873a08..ace4a68f 100644
--- a/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailmaskedenvmap.psh
+++ b/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailmaskedenvmap.psh
@@ -1,21 +1,21 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0 ; base color
-tex t1 ; cube map
-tex t2 ; envmap mask
-tex t3 ; detail texture
-
-mul r0, t0, c3 ; Base times modulation
-mul_x2 r0.rgb, r0, t3 ; detail texture
-mul r1, t1, t2 ; Envmap * mask
-mad r0.rgb, r1, c2, r0 ; Base * mod + envmap * mask * tint
-mul r0.rgb, v0, r0 ; apply vertex lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0 ; base color
+tex t1 ; cube map
+tex t2 ; envmap mask
+tex t3 ; detail texture
+
+mul r0, t0, c3 ; Base times modulation
+mul_x2 r0.rgb, r0, t3 ; detail texture
+mul r1, t1, t2 ; Envmap * mask
+mad r0.rgb, r1, c2, r0 ; Base * mod + envmap * mask * tint
+mul r0.rgb, v0, r0 ; apply vertex lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailselfilluminatedenvmap.psh b/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailselfilluminatedenvmap.psh
index 44dee8d4..9cc71776 100644
--- a/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailselfilluminatedenvmap.psh
+++ b/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailselfilluminatedenvmap.psh
@@ -1,28 +1,28 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-; Get the color from the texture
-tex t0
-tex t1
-tex t3
-
-mul r0.rgb, t0, c3 + ; base times modulation
-mov r0.a, c3.a ; use modulation alpha (don't use texture alpha)
-
-mul_x2 r0.rgb, r0, t3 ; detail texture
-
-mad r0.rgb, t1, c2, r0 ; + envmap * envmaptint (color only)
-
-mul r0.rgb, v0, r0 ; Apply lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-mul r1, t0, c1 ; Self illum * tint
-lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+; Get the color from the texture
+tex t0
+tex t1
+tex t3
+
+mul r0.rgb, t0, c3 + ; base times modulation
+mov r0.a, c3.a ; use modulation alpha (don't use texture alpha)
+
+mul_x2 r0.rgb, r0, t3 ; detail texture
+
+mad r0.rgb, t1, c2, r0 ; + envmap * envmaptint (color only)
+
+mul r0.rgb, v0, r0 ; Apply lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+mul r1, t0, c1 ; Self illum * tint
+lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
+
diff --git a/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailselfilluminatedmaskedenvmap.psh b/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailselfilluminatedmaskedenvmap.psh
index 4be599ca..24396a07 100644
--- a/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailselfilluminatedmaskedenvmap.psh
+++ b/sp/src/materialsystem/stdshaders/vertexlitgeneric_detailselfilluminatedmaskedenvmap.psh
@@ -1,29 +1,29 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-; Get the color from the texture
-tex t0 ; base
-tex t1 ; env map
-tex t2 ; mask
-tex t3 ; Detail
-
-mul r0.rgb, t0, c3 + ; base times modulation
-mul r0.a, c3.a, t2.a ; alpha = mod alpha * mask alpha
-
-mul_x2 r0.rgb, r0, t3 ; detail texture
-
-mul r1, t2, t1 ; envmapmask * envmap
-mad r0.rgb, r1, c2, r0 ; + envmapmask * envmap * envmaptint (color only)
-
-mul r0.rgb, v0, r0 ; Apply lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-mul r1, t0, c1 ; Self illum * tint
-lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+; Get the color from the texture
+tex t0 ; base
+tex t1 ; env map
+tex t2 ; mask
+tex t3 ; Detail
+
+mul r0.rgb, t0, c3 + ; base times modulation
+mul r0.a, c3.a, t2.a ; alpha = mod alpha * mask alpha
+
+mul_x2 r0.rgb, r0, t3 ; detail texture
+
+mul r1, t2, t1 ; envmapmask * envmap
+mad r0.rgb, r1, c2, r0 ; + envmapmask * envmap * envmaptint (color only)
+
+mul r0.rgb, v0, r0 ; Apply lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+mul r1, t0, c1 ; Self illum * tint
+lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
diff --git a/sp/src/materialsystem/stdshaders/vertexlitgeneric_envmap.psh b/sp/src/materialsystem/stdshaders/vertexlitgeneric_envmap.psh
index e539da67..019f8c0a 100644
--- a/sp/src/materialsystem/stdshaders/vertexlitgeneric_envmap.psh
+++ b/sp/src/materialsystem/stdshaders/vertexlitgeneric_envmap.psh
@@ -1,17 +1,17 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0 ; base color
-tex t1 ; cube map
-
-mul r0, t0, c3 ; base times modulation
-mad r0.rgb, t1, c2, r0 ; + envmap * envmaptint (color only)
-mul r0.rgb, v0, r0 ; apply vertex lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0 ; base color
+tex t1 ; cube map
+
+mul r0, t0, c3 ; base times modulation
+mad r0.rgb, t1, c2, r0 ; + envmap * envmaptint (color only)
+mul r0.rgb, v0, r0 ; apply vertex lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/vertexlitgeneric_lightingonly_overbright2.psh b/sp/src/materialsystem/stdshaders/vertexlitgeneric_lightingonly_overbright2.psh
index dd19efce..722e1418 100644
--- a/sp/src/materialsystem/stdshaders/vertexlitgeneric_lightingonly_overbright2.psh
+++ b/sp/src/materialsystem/stdshaders/vertexlitgeneric_lightingonly_overbright2.psh
@@ -1,5 +1,5 @@
-ps.1.1
-
-mov r0, v0
-
-
+ps.1.1
+
+mov r0, v0
+
+
diff --git a/sp/src/materialsystem/stdshaders/vertexlitgeneric_maskedenvmap.psh b/sp/src/materialsystem/stdshaders/vertexlitgeneric_maskedenvmap.psh
index c10600e3..afee48ad 100644
--- a/sp/src/materialsystem/stdshaders/vertexlitgeneric_maskedenvmap.psh
+++ b/sp/src/materialsystem/stdshaders/vertexlitgeneric_maskedenvmap.psh
@@ -1,19 +1,19 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-tex t0 ; base color
-tex t1 ; cube map
-tex t2 ; envmap mask
-
-mul r0, t0, c3 ; Base times modulation
-mul r1, t1, t2 ; Envmap * mask
-mad r0.rgb, r1, c2, r0 ; Base * mod + envmap * mask * tint
-mul r0.rgb, v0, r0 ; apply vertex lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+tex t0 ; base color
+tex t1 ; cube map
+tex t2 ; envmap mask
+
+mul r0, t0, c3 ; Base times modulation
+mul r1, t1, t2 ; Envmap * mask
+mad r0.rgb, r1, c2, r0 ; Base * mod + envmap * mask * tint
+mul r0.rgb, v0, r0 ; apply vertex lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
diff --git a/sp/src/materialsystem/stdshaders/vertexlitgeneric_selfilluminatedenvmap.psh b/sp/src/materialsystem/stdshaders/vertexlitgeneric_selfilluminatedenvmap.psh
index 321e797b..4b479199 100644
--- a/sp/src/materialsystem/stdshaders/vertexlitgeneric_selfilluminatedenvmap.psh
+++ b/sp/src/materialsystem/stdshaders/vertexlitgeneric_selfilluminatedenvmap.psh
@@ -1,25 +1,25 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-; Get the color from the texture
-tex t0
-tex t1
-
-mul r0.rgb, t0, c3 + ; base times modulation
-mov r0.a, c3.a ; use modulation alpha (don't use texture alpha)
-
-mad r0.rgb, t1, c2, r0 ; + envmap * envmaptint (color only)
-
-mul r0.rgb, v0, r0 ; Apply lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-mul r1, t0, c1 ; Self illum * tint
-lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
-
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+; Get the color from the texture
+tex t0
+tex t1
+
+mul r0.rgb, t0, c3 + ; base times modulation
+mov r0.a, c3.a ; use modulation alpha (don't use texture alpha)
+
+mad r0.rgb, t1, c2, r0 ; + envmap * envmaptint (color only)
+
+mul r0.rgb, v0, r0 ; Apply lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+mul r1, t0, c1 ; Self illum * tint
+lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
+
diff --git a/sp/src/materialsystem/stdshaders/vertexlitgeneric_selfilluminatedmaskedenvmap.psh b/sp/src/materialsystem/stdshaders/vertexlitgeneric_selfilluminatedmaskedenvmap.psh
index e7c52910..38c80e4f 100644
--- a/sp/src/materialsystem/stdshaders/vertexlitgeneric_selfilluminatedmaskedenvmap.psh
+++ b/sp/src/materialsystem/stdshaders/vertexlitgeneric_selfilluminatedmaskedenvmap.psh
@@ -1,26 +1,26 @@
-ps.1.1
-
-;------------------------------------------------------------------------------
-; Draw a texture . . woo hoo!
-; t0 - texture
-;
-; The texture coordinates need to be defined as follows:
-; tc0 - texcoords
-;------------------------------------------------------------------------------
-
-; Get the color from the texture
-tex t0 ; base
-tex t1 ; env map
-tex t2 ; mask
-
-mul r0.rgb, t0, c3 + ; base times modulation
-mul r0.a, c3.a, t2.a ; alpha = mod alpha * mask alpha
-
-mul r1, t2, t1 ; envmapmask * envmap
-mad r0.rgb, r1, c2, r0 ; + envmapmask * envmap * envmaptint (color only)
-
-mul r0.rgb, v0, r0 ; Apply lighting
-mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
-
-mul r1, t0, c1 ; Self illum * tint
-lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
+ps.1.1
+
+;------------------------------------------------------------------------------
+; Draw a texture . . woo hoo!
+; t0 - texture
+;
+; The texture coordinates need to be defined as follows:
+; tc0 - texcoords
+;------------------------------------------------------------------------------
+
+; Get the color from the texture
+tex t0 ; base
+tex t1 ; env map
+tex t2 ; mask
+
+mul r0.rgb, t0, c3 + ; base times modulation
+mul r0.a, c3.a, t2.a ; alpha = mod alpha * mask alpha
+
+mul r1, t2, t1 ; envmapmask * envmap
+mad r0.rgb, r1, c2, r0 ; + envmapmask * envmap * envmaptint (color only)
+
+mul r0.rgb, v0, r0 ; Apply lighting
+mul_x2 r0.rgb, c0, r0 ; * 2 * (overbrightFactor/2)
+
+mul r1, t0, c1 ; Self illum * tint
+lrp r0.rgb, t0.a, r1, r0 ; Blend between self-illum + base * lighting
diff --git a/sp/src/materialsystem/stdshaders/waterreflect_ps14.psh b/sp/src/materialsystem/stdshaders/waterreflect_ps14.psh
index 7104e45c..4d277b1e 100644
--- a/sp/src/materialsystem/stdshaders/waterreflect_ps14.psh
+++ b/sp/src/materialsystem/stdshaders/waterreflect_ps14.psh
@@ -1,8 +1,8 @@
-ps.1.4
-
-texld r0, t0_dw.xyw ; sample dudv map
-
-phase
-
-texld r0, t0
-
+ps.1.4
+
+texld r0, t0_dw.xyw ; sample dudv map
+
+phase
+
+texld r0, t0
+
diff --git a/sp/src/materialsystem/stdshaders/waterrefract_ps14.psh b/sp/src/materialsystem/stdshaders/waterrefract_ps14.psh
index 5b5d1755..8d63934d 100644
--- a/sp/src/materialsystem/stdshaders/waterrefract_ps14.psh
+++ b/sp/src/materialsystem/stdshaders/waterrefract_ps14.psh
@@ -1,23 +1,23 @@
-ps.1.4
-
-; non-fresnel version
-; t0:
-; texture: dudv map
-; texcoords: coords for normal map
-; t1:
-; texcoords: uvw for first dp3
-; t2:
-; texture: renderable texture that we are going to perturb
-; texcoords: uvw for second dp3
-;tex t0 ; sample dudv map
-;texm3x2pad t1, t0 ;
-;texm3x2tex t2, t0 ; sample renderabletexture
-
-;mul r0, t2, c1
-
-
-texld r0, t0 ; sample dudv map
-
-phase
-
-texld r0, t2_dw.xyw
+ps.1.4
+
+; non-fresnel version
+; t0:
+; texture: dudv map
+; texcoords: coords for normal map
+; t1:
+; texcoords: uvw for first dp3
+; t2:
+; texture: renderable texture that we are going to perturb
+; texcoords: uvw for second dp3
+;tex t0 ; sample dudv map
+;texm3x2pad t1, t0 ;
+;texm3x2tex t2, t0 ; sample renderabletexture
+
+;mul r0, t2, c1
+
+
+texld r0, t0 ; sample dudv map
+
+phase
+
+texld r0, t2_dw.xyw