summaryrefslogtreecommitdiff
path: root/materialsystem/stdshaders/decalbasetimeslightmapalphablendselfillum2_ps2x.fxc
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /materialsystem/stdshaders/decalbasetimeslightmapalphablendselfillum2_ps2x.fxc
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'materialsystem/stdshaders/decalbasetimeslightmapalphablendselfillum2_ps2x.fxc')
-rw-r--r--materialsystem/stdshaders/decalbasetimeslightmapalphablendselfillum2_ps2x.fxc26
1 files changed, 26 insertions, 0 deletions
diff --git a/materialsystem/stdshaders/decalbasetimeslightmapalphablendselfillum2_ps2x.fxc b/materialsystem/stdshaders/decalbasetimeslightmapalphablendselfillum2_ps2x.fxc
new file mode 100644
index 0000000..f8489d7
--- /dev/null
+++ b/materialsystem/stdshaders/decalbasetimeslightmapalphablendselfillum2_ps2x.fxc
@@ -0,0 +1,26 @@
+// DYNAMIC: "PIXELFOGTYPE" "0..1"
+
+// STATIC: "CONVERT_TO_SRGB" "0..1" [ps20b][= g_pHardwareConfig->NeedsShaderSRGBConversion()] [PC]
+// STATIC: "CONVERT_TO_SRGB" "0..0" [= 0] [XBOX]
+
+#include "shader_constant_register_map.h"
+#include "common_ps_fxc.h"
+
+sampler BaseTextureSampler : register( s0 );
+
+const float4 g_FogParams : register( PSREG_FOG_PARAMS );
+const float4 g_EyePos_SpecExponent : register( PSREG_EYEPOS_SPEC_EXPONENT );
+
+struct PS_INPUT
+{
+ float2 vTexCoord0 : TEXCOORD0;
+ float4 worldPos_projPosZ : TEXCOORD4; // Necessary for pixel fog
+};
+
+float4 main( PS_INPUT i ) : COLOR
+{
+ HALF4 result = tex2D( BaseTextureSampler, i.vTexCoord0 );
+
+ float fogFactor = CalcPixelFogFactor( PIXELFOGTYPE, g_FogParams, g_EyePos_SpecExponent.z, i.worldPos_projPosZ.z, i.worldPos_projPosZ.w );
+ return FinalOutput( result, fogFactor, PIXELFOGTYPE, TONEMAP_SCALE_LINEAR );
+}