diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /materialsystem/stdshaders/showz_ps2x.fxc | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'materialsystem/stdshaders/showz_ps2x.fxc')
| -rw-r--r-- | materialsystem/stdshaders/showz_ps2x.fxc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/materialsystem/stdshaders/showz_ps2x.fxc b/materialsystem/stdshaders/showz_ps2x.fxc new file mode 100644 index 0000000..bc45e1d --- /dev/null +++ b/materialsystem/stdshaders/showz_ps2x.fxc @@ -0,0 +1,34 @@ +// STATIC: "DEPTH_IN_ALPHA" "0..1" +// STATIC: "CONVERT_TO_SRGB" "0..1" [ps20b][= g_pHardwareConfig->NeedsShaderSRGBConversion()] [PC] +// STATIC: "CONVERT_TO_SRGB" "0..0" [= 0] [XBOX] + +#include "common_ps_fxc.h" + +const float4 g_Parameters : register( c0 ); + +sampler DepthTextureSampler : register( s0 ); // Scalar shadow depth map + +float4 main( float2 baseTexCoord : TEXCOORD0 ) : COLOR +{ + float fDepth = 0; + +# if (DEPTH_IN_ALPHA == 1) + { + fDepth = tex2D( DepthTextureSampler, baseTexCoord ).a; + + } +# else + { +# if !(defined(SHADER_MODEL_PS_1_1) || defined(SHADER_MODEL_PS_1_4) || defined(SHADER_MODEL_PS_2_0)) //Minimum requirement of ps2b + { + fDepth = tex2D( DepthTextureSampler, baseTexCoord ).r; + } +# endif + } +# endif + + fDepth = pow( fDepth, g_Parameters.x ); + + return FinalOutput( float4( fDepth, fDepth, fDepth, 1.0f ), 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE ); +} + |