diff options
Diffstat (limited to 'materialsystem/stdshaders/accumbuff5sample_ps2x.fxc')
| -rw-r--r-- | materialsystem/stdshaders/accumbuff5sample_ps2x.fxc | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/materialsystem/stdshaders/accumbuff5sample_ps2x.fxc b/materialsystem/stdshaders/accumbuff5sample_ps2x.fxc new file mode 100644 index 0000000..231ac8e --- /dev/null +++ b/materialsystem/stdshaders/accumbuff5sample_ps2x.fxc @@ -0,0 +1,35 @@ +// STATIC: "CONVERT_TO_SRGB" "0..1" [ps20b][= g_pHardwareConfig->NeedsShaderSRGBConversion()] [PC] +// STATIC: "CONVERT_TO_SRGB" "0..0" [= 0] [XBOX] + +#define HDRTYPE HDR_TYPE_NONE +#include "common_ps_fxc.h" + +sampler TexSampler0 : register( s0 ); +sampler TexSampler1 : register( s1 ); +sampler TexSampler2 : register( s2 ); +sampler TexSampler3 : register( s3 ); +sampler TexSampler4 : register( s4 ); + +struct PS_INPUT +{ + float2 texCoord : TEXCOORD0; +}; + +const float4 weights : register( c0 ); + +float4 main( PS_INPUT i ) : COLOR +{ + // Just sample the four input textures + float4 sample0 = tex2D( TexSampler0, i.texCoord ); + float4 sample1 = tex2D( TexSampler1, i.texCoord ); + float4 sample2 = tex2D( TexSampler2, i.texCoord ); + float4 sample3 = tex2D( TexSampler3, i.texCoord ); + float4 sample4 = tex2D( TexSampler4, i.texCoord ); + + // Compute weighted average and return + return FinalOutput( weights.x * sample0 + + weights.x * sample1 + + weights.x * sample2 + + weights.x * sample3 + + weights.y * sample4, 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE ); +} |